home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / PInterfaces / OCEAuthDir.p < prev    next >
Encoding:
Text File  |  1995-07-06  |  166.0 KB  |  4,589 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        OCEAuthDir.p
  3.  
  4.      Contains:    Apple Open Collaboration Environment Authentication Interfaces.
  5.  
  6.      Version:    Technology:    AOCE Toolbox 1.02
  7.                  Package:    Universal Interfaces 2.1 in “MPW Latest” on ETO #18
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. }
  19.  
  20. {$IFC UNDEFINED UsingIncludes}
  21. {$SETC UsingIncludes := 0}
  22. {$ENDC}
  23.  
  24. {$IFC NOT UsingIncludes}
  25.  UNIT OCEAuthDir;
  26.  INTERFACE
  27. {$ENDC}
  28.  
  29. {$IFC UNDEFINED __OCEAUTHDIR__}
  30. {$SETC __OCEAUTHDIR__ := 1}
  31.  
  32. {$I+}
  33. {$SETC OCEAuthDirIncludes := UsingIncludes}
  34. {$SETC UsingIncludes := 1}
  35.  
  36.  
  37. {$IFC UNDEFINED __EVENTS__}
  38. {$I Events.p}
  39. {$ENDC}
  40. {    Types.p                                                        }
  41. {        ConditionalMacros.p                                        }
  42. {    Quickdraw.p                                                    }
  43. {        MixedMode.p                                                }
  44. {        QuickdrawText.p                                            }
  45. {    OSUtils.p                                                    }
  46. {        Memory.p                                                }
  47.  
  48. {$IFC UNDEFINED __NOTIFICATION__}
  49. {$I Notification.p}
  50. {$ENDC}
  51.  
  52. {$IFC UNDEFINED __APPLEEVENTS__}
  53. {$I AppleEvents.p}
  54. {$ENDC}
  55. {    Errors.p                                                    }
  56. {    EPPC.p                                                        }
  57. {        AppleTalk.p                                                }
  58. {        Files.p                                                    }
  59. {            Finder.p                                            }
  60. {        PPCToolbox.p                                            }
  61. {        Processes.p                                                }
  62.  
  63. {$IFC UNDEFINED __APPLETALK__}
  64. {$I AppleTalk.p}
  65. {$ENDC}
  66.  
  67. {$IFC UNDEFINED __FILES__}
  68. {$I Files.p}
  69. {$ENDC}
  70.  
  71. {$IFC UNDEFINED __OSUTILS__}
  72. {$I OSUtils.p}
  73. {$ENDC}
  74.  
  75. {$IFC UNDEFINED __TYPES__}
  76. {$I Types.p}
  77. {$ENDC}
  78.  
  79. {$IFC UNDEFINED __OCE__}
  80. {$I OCE.p}
  81. {$ENDC}
  82. {    Aliases.p                                                    }
  83. {    Script.p                                                    }
  84. {        IntlResources.p                                            }
  85.  
  86. {$PUSH}
  87. {$ALIGN MAC68K}
  88. {$LibExport+}
  89.  
  90. CONST
  91.     kRC4KeySizeInBytes            = 8;                            { size of an RC4 key }
  92.     kRefNumUnknown                = 0;
  93.  
  94.     kEnumDistinguishedNameBit    = 0;
  95.     kEnumAliasBit                = 1;
  96.     kEnumPseudonymBit            = 2;
  97.     kEnumDNodeBit                = 3;
  98.     kEnumInvisibleBit            = 4;
  99.  
  100. { Values of DirEnumChoices }
  101.     kEnumDistinguishedNameMask    = 1 * (2**(kEnumDistinguishedNameBit));
  102.     kEnumAliasMask                = 1 * (2**(kEnumAliasBit));
  103.     kEnumPseudonymMask            = 1 * (2**(kEnumPseudonymBit));
  104.     kEnumDNodeMask                = 1 * (2**(kEnumDNodeBit));
  105.     kEnumInvisibleMask            = 1 * (2**(kEnumInvisibleBit));
  106.     kEnumAllMask                = 0+(kEnumDistinguishedNameMask + kEnumAliasMask + kEnumPseudonymMask + kEnumDNodeMask + kEnumInvisibleMask);
  107.  
  108.     
  109. TYPE
  110.     DirEnumChoices = LONGINT;
  111.  
  112. { Values of DirSortOption }
  113.  
  114. CONST
  115.     kSortByName                    = 0;
  116.     kSortByType                    = 1;
  117.  
  118. { Values of DirSortDirection }
  119.     kSortForwards                = 0;
  120.     kSortBackwards                = 1;
  121.  
  122. { Values of DirMatchWith }
  123.     kMatchAll                    = 0;
  124.     kExactMatch                    = 1;
  125.     kBeginsWith                    = 2;
  126.     kEndingWith                    = 3;
  127.     kContaining                    = 4;
  128.  
  129.     
  130. TYPE
  131.     DirMatchWith = SInt8;
  132.  
  133.  
  134. CONST
  135.     kCurrentOCESortVersion        = 1;
  136.  
  137. {  Access controls are implemented on three levels:
  138.  *      DNode, Record, and Attribute Type levels
  139.  *  Some access control bits apply to the container itself, and some apply to its contents.
  140.  *
  141.  *  The Catalog Toolbox supports six functions.  These calls are:
  142.  *  DSGetDNodeAccessControl : to get Access Controls at the DNode level
  143.  *    DSGetRecordAccessControl  : to get Access Controls at the record level
  144.  *  DSGetAttributeAccessControl : to get Access Privileges at the attribute type level
  145.  * 
  146.  *  The GetXXXAccessControl calls will return access control masks for various categories
  147.  *  of users.  Please refer to the access control document for a description of the
  148.  *  categories of users.  In general these are:
  149.  *      ThisRecordOwner         - means the identity of the record itself
  150.  *      Friends                  - means any one of the assigned friends for the record
  151.  *      AuthenticatedInDNode     - means any valid user that is an authenticated entity
  152.  *          in the DNode in which this record is located
  153.  *      AuthenticatedInDirectory - means any valid authenticated catalog user
  154.  *      Guest                      - means an unauthenticated user.
  155.  *  Bit masks for various permitted access controls are defined below.
  156.  *
  157.  *  GetXXXAccessControl calls will return access control masks for various categories of
  158.  *  users for this record. In addition they also return the level of access controls
  159.  *  that the user (who is making the GetXXXAccessControl call) has for the DNode,
  160.  *  record, or attribute type.
  161.  *
  162.  *  For records, the access control granted will be minimum of the DNode access
  163.  *  control and record access control masks.  For example, to add an attribute type to a
  164.  *  record, a user must have access control kCreateAttributeTypes at the record and
  165.  *  DNode levels.  Similarly, at the attribute type level, access controls will be the
  166.  *  minimum of the DNode, record, and attribute type access controls.
  167.  *
  168.  *  
  169.  }
  170. { access privileges bit numbers }
  171.     kSeeBit                        = 0;
  172.     kAddBit                        = 1;
  173.     kDeleteBit                    = 2;
  174.     kChangeBit                    = 3;
  175.     kRenameBit                    = 4;
  176.     kChangePrivsBit                = 5;
  177.     kSeeFoldersBit                = 6;
  178.  
  179. { Values of AccessMask }
  180.     kSeeMask                    = 0+(1 * (2**(kSeeBit)));
  181.     kAddMask                    = 0+(1 * (2**(kAddBit)));
  182.     kDeleteMask                    = 0+(1 * (2**(kDeleteBit)));
  183.     kChangeMask                    = 0+(1 * (2**(kChangeBit)));
  184.     kRenameMask                    = 0+(1 * (2**(kRenameBit)));
  185.     kChangePrivsMask            = 0+(1 * (2**(kChangePrivsBit)));
  186.     kSeeFoldersMask                = 0+(1 * (2**(kSeeFoldersBit)));
  187.  
  188.     kAllPrivs                    = 0+(kSeeMask + kAddMask + kDeleteMask + kChangeMask + kRenameMask + kChangePrivsMask + kSeeFoldersMask);
  189.     kNoPrivs                    = 0;
  190.  
  191. {
  192.  
  193. kSupportsDNodeNumberBit:
  194. If this bit is set, a DNode can be referenced using DNodeNumbers. 
  195. RecordLocationInfo can be specified using DNodeNumber and PathName component can be nil. 
  196. If this bit is not set, a DNode can be referenced only by PathName to the DNode. In the 
  197. later case DNodeNumber component inside record location info must be set to zero.
  198.  
  199. kSupportsRecordCreationIDBit:
  200. If this bit is set, a record can be referenced by specifying CreationID 
  201. in most catalog manager calls. If this bit is not set recordName and recordType are 
  202. required in the recordID specification for all catalog manager calls.
  203.  
  204. kSupportsAttributeCreationIDBit:
  205. If this bit is set, an attribute value can be obtained by specifying it's 
  206. CreationID in Lookup call staring point and also can be used in operations 
  207. like DeleteAttributeValue and ChangeAttributeValue an Attribute can be 
  208. specified by AttributeType and CreationID.
  209.  
  210. *************************************************************************
  211. Implicit assumption with creationID's and dNodeNumbers are, when supported
  212. they are persistent and will preserved across boots and life of the system.
  213. *************************************************************************
  214.  
  215. Following three bits are for determining the sort order in enumeration.
  216. kSupportsMatchAllBit:
  217. If this bit is set, enumeration of all the records is supported
  218.  
  219. kSupportsBeginsWithBit:
  220. If this bit is set, enumeration of records matching prefix (e.g. Begin with abc)
  221. is supported
  222.  
  223. kSupportsExactMatchBit:
  224. If this bit is set, existence of a record matching exact matchNameString and recordType
  225. is supported.
  226.  
  227. kSupportsEndsWithBit:
  228. If this bit is set, enumeration of records matching suffix (e.g. end with abc)
  229. is supported.
  230.  
  231. kSupportsContainsBit:
  232. If this bit is set, enumeration of records containing a matchNameString (e.g. containing abc)
  233. is supported
  234.  
  235.  
  236. Implicit assumption in all these is, a record type can be specified either as one of the above or
  237. a type list(more then one) to match exact type.
  238. The Following four bits will indicate sort ordering in enumeration.
  239.  
  240. kSupportsOrderedEnumerationBit:
  241. If this bit is set, Enumerated records or in some order possibly in name order.
  242.  
  243. kCanSupportNameOrderBit:
  244. If this is set, catalog will support sortbyName option in Enumerate.
  245.  
  246. kCanSupportTypeOrderBit:
  247. If this bit is set, catalog will support sortbyType option in enumearte.
  248.  
  249. kSupportSortBackwardsBit:
  250. If this bit is set, catalog supports backward sorting.
  251.  
  252. kSupportIndexRatioBit:
  253. If this bit is set, it indicates that enumeration will return approximate position
  254. of a record (percentile) among all records.
  255.  
  256. kSupportsEnumerationContinueBit:
  257. If this bit is set, catalog supports enumeration continue.
  258.  
  259. kSupportsLookupContinueBit:
  260. If this bit is set, catalog supports lookup continue.
  261.  
  262. kSupportsEnumerateAttributeTypeContinueBit:
  263. If this bit is set, catalog supports EnumerateAttributeType continue.
  264.  
  265. kSupportsEnumeratePseudonymContinueBit:
  266. If this bit is set, catalog supports EnumeratePseudonym continue.
  267.  
  268. kSupportsAliasesBit:
  269. If this bit is set, catalog supports create/delte/enumerate 
  270. of Alias Records.
  271.  
  272. kSupportPseudonymBit: 
  273. If this bit is set, catalog supports create/delte/enumerate of 
  274. pseudonyms for a record.
  275.  
  276. kSupportsPartialPathNameBit:
  277. If this bit is set, catalog nodes can be specified using DNodeNumber of a 
  278. intermediate DNode and a partial name starting from that DNode to the intended 
  279. DNode.
  280.  
  281. kSupportsAuthenticationBit:
  282. If this bit is set, catalog supports authentication manager calls.
  283.  
  284. kSupportsProxiesBit:
  285. If this bit is set, catalog supports proxy related calls in authentication manager. 
  286.  
  287. kSupportsFindRecordBit:
  288. If this bit is set, catalog supports find record call.
  289.  
  290. Bits and corresponding masks are as defined below.
  291. }
  292.     kSupportsDNodeNumberBit        = 0;
  293.     kSupportsRecordCreationIDBit = 1;
  294.     kSupportsAttributeCreationIDBit = 2;
  295.     kSupportsMatchAllBit        = 3;
  296.     kSupportsBeginsWithBit        = 4;
  297.     kSupportsExactMatchBit        = 5;
  298.     kSupportsEndsWithBit        = 6;
  299.     kSupportsContainsBit        = 7;
  300.     kSupportsOrderedEnumerationBit = 8;
  301.     kCanSupportNameOrderBit        = 9;
  302.     kCanSupportTypeOrderBit        = 10;
  303.     kSupportSortBackwardsBit    = 11;
  304.     kSupportIndexRatioBit        = 12;
  305.     kSupportsEnumerationContinueBit = 13;
  306.     kSupportsLookupContinueBit    = 14;
  307.     kSupportsEnumerateAttributeTypeContinueBit = 15;
  308.     kSupportsEnumeratePseudonymContinueBit = 16;
  309.     kSupportsAliasesBit            = 17;
  310.     kSupportsPseudonymsBit        = 18;
  311.     kSupportsPartialPathNamesBit = 19;
  312.     kSupportsAuthenticationBit    = 20;
  313.     kSupportsProxiesBit            = 21;
  314.     kSupportsFindRecordBit        = 22;
  315.  
  316. { values of DirGestalt }
  317.     kSupportsDNodeNumberMask    = 1 * (2**(kSupportsDNodeNumberBit));
  318.     kSupportsRecordCreationIDMask = 1 * (2**(kSupportsRecordCreationIDBit));
  319.     kSupportsAttributeCreationIDMask = 1 * (2**(kSupportsAttributeCreationIDBit));
  320.     kSupportsMatchAllMask        = 1 * (2**(kSupportsMatchAllBit));
  321.     kSupportsBeginsWithMask        = 1 * (2**(kSupportsBeginsWithBit));
  322.     kSupportsExactMatchMask        = 1 * (2**(kSupportsExactMatchBit));
  323.     kSupportsEndsWithMask        = 1 * (2**(kSupportsEndsWithBit));
  324.     kSupportsContainsMask        = 1 * (2**(kSupportsContainsBit));
  325.     kSupportsOrderedEnumerationMask = 1 * (2**(kSupportsOrderedEnumerationBit));
  326.     kCanSupportNameOrderMask    = 1 * (2**(kCanSupportNameOrderBit));
  327.     kCanSupportTypeOrderMask    = 1 * (2**(kCanSupportTypeOrderBit));
  328.     kSupportSortBackwardsMask    = 1 * (2**(kSupportSortBackwardsBit));
  329.     kSupportIndexRatioMask        = 1 * (2**(kSupportIndexRatioBit));
  330.     kSupportsEnumerationContinueMask = 1 * (2**(kSupportsEnumerationContinueBit));
  331.     kSupportsLookupContinueMask    = 1 * (2**(kSupportsLookupContinueBit));
  332.     kSupportsEnumerateAttributeTypeContinueMask = 1 * (2**(kSupportsEnumerateAttributeTypeContinueBit));
  333.     kSupportsEnumeratePseudonymContinueMask = 1 * (2**(kSupportsEnumeratePseudonymContinueBit));
  334.     kSupportsAliasesMask        = 1 * (2**(kSupportsAliasesBit));
  335.     kSupportsPseudonymsMask        = 1 * (2**(kSupportsPseudonymsBit));
  336.     kSupportsPartialPathNamesMask = 1 * (2**(kSupportsPartialPathNamesBit));
  337.     kSupportsAuthenticationMask    = 1 * (2**(kSupportsAuthenticationBit));
  338.     kSupportsProxiesMask        = 1 * (2**(kSupportsProxiesBit));
  339.     kSupportsFindRecordMask        = 1 * (2**(kSupportsFindRecordBit));
  340.  
  341. { Values of AuthLocalIdentityOp }
  342.     kAuthLockLocalIdentityOp    = 1;
  343.     kAuthUnlockLocalIdentityOp    = 2;
  344.     kAuthLocalIdentityNameChangeOp = 3;
  345.  
  346. { Values of AuthLocalIdentityLockAction }
  347.     kAuthLockPending            = 1;
  348.     kAuthLockWillBeDone            = 2;
  349.  
  350. { Values of AuthNotifications }
  351.     kNotifyLockBit                = 0;
  352.     kNotifyUnlockBit            = 1;
  353.     kNotifyNameChangeBit        = 2;
  354.  
  355.     kNotifyLockMask                = 1 * (2**(kNotifyLockBit));
  356.     kNotifyUnlockMask            = 1 * (2**(kNotifyUnlockBit));
  357.     kNotifyNameChangeMask        = 1 * (2**(kNotifyNameChangeBit));
  358.  
  359.     kPersonalDirectoryFileCreator = 'kl03';
  360.     kPersonalDirectoryFileType    = 'pabt';
  361.     kBusinessCardFileType        = 'bust';
  362.     kDirectoryFileType            = 'dirt';
  363.     kDNodeFileType                = 'dnod';
  364.     kDirsRootFileType            = 'drtt';
  365.     kRecordFileType                = 'rcrd';
  366.  
  367.     
  368. TYPE
  369.     DirSortOption = INTEGER;
  370.  
  371.     DirSortDirection = INTEGER;
  372.  
  373.     AccessMask = LONGINT;
  374.  
  375.     DirGestalt = LONGINT;
  376.  
  377.     AuthLocalIdentityOp = LONGINT;
  378.  
  379.     AuthLocalIdentityLockAction = LONGINT;
  380.  
  381.     AuthNotifications = LONGINT;
  382.  
  383.     DNodeID = RECORD
  384.         dNodeNumber:            DNodeNum;                                { dNodenumber  }
  385.         reserved1:                LONGINT;
  386.         name:                    RStringPtr;
  387.         reserved2:                LONGINT;
  388.     END;
  389.  
  390.     DirEnumSpec = RECORD
  391.         enumFlag:                DirEnumChoices;
  392.         indexRatio:                INTEGER;                                { Approx Record Position between 1 and 100 If supported, 0 If not supported }
  393.         CASE INTEGER OF
  394.         0: (
  395.             recordIdentifier:            LocalRecordID;
  396.            );
  397.         1: (
  398.             dNodeIdentifier:            DNodeID;
  399.            );
  400.     END;
  401.  
  402.     DirMetaInfo = RECORD
  403.         info:                    ARRAY [0..3] OF LONGINT;
  404.     END;
  405.  
  406.     SLRV = RECORD
  407.         script:                    ScriptCode;                                {   Script code in which entries are sorted }
  408.         language:                INTEGER;                                {   Language code in which entries are sorted }
  409.         regionCode:                INTEGER;                                {   Region code in which entries are sorted }
  410.         version:                INTEGER;                                {  version of oce sorting software }
  411.     END;
  412.  
  413. { Catalog types and operations }
  414. { unique identifier for an identity }
  415.     AuthIdentity = LONGINT;
  416.  
  417. { Umbrella LocalIdentity }
  418.     LocalIdentity = AuthIdentity;
  419.  
  420. { A DES key is 8 bytes of data }
  421.     DESKey = RECORD
  422.         a:                        LONGINT;
  423.         b:                        LONGINT;
  424.     END;
  425.  
  426.     RC4Key = ARRAY [0..kRC4KeySizeInBytes-1] OF SignedByte;
  427.  
  428.     AuthKeyType = LONGINT;
  429.  
  430. { key type followed by its data }
  431.     AuthKey = RECORD
  432.         keyType:                AuthKeyType;
  433.         CASE INTEGER OF
  434.         0: (
  435.             des:                        DESKey;
  436.            );
  437.         1: (
  438.             rc4:                        RC4Key;
  439.            );
  440.     END;
  441.  
  442.     AuthKeyPtr = ^AuthKey;
  443.  
  444.     AuthParamBlockPtr = ^AuthParamBlock;
  445.  
  446.     AuthIOCompletionProcPtr = ProcPtr;  { PROCEDURE AuthIOCompletion(paramBlock: AuthParamBlockPtr); }
  447.     AuthIOCompletionUPP = UniversalProcPtr;
  448.  
  449. {
  450. This header is common to all the parameter blocks.  Clients should not directly
  451. touch any of these fields except ioCompletion.  ioCompletion is the
  452. completion routine pointer for async calls; it is ignored for sync calls.
  453. ioResult is the result code from the call.
  454. }
  455. {****************************************************************************
  456.  
  457.  
  458.         Authentication Manager operations 
  459.  
  460. ****************************************************************************}
  461. {
  462. kAuthResolveCreationID:
  463. userRecord will contain the user information whose creationID has to be
  464. returned. A client must make this call when he does not know the creaitionID.
  465. The creationID must be set to nil before making the call. The server will attempt
  466. to match the recordid's in the data base which match the user name and
  467. type in the record.  Depending on number of matchings, following
  468. results will be returned.
  469. Exactly One Match : CreationID in RecordID and also in buffer (if buffer is given)
  470. totalMatches = actualMatches = 1.
  471. > 1 Match:
  472.     Buffer is Large Enough:
  473.     totalMatches = actualMatches
  474.     Buffer will contain all the CIDs, kOCEAmbiguousMatches error.
  475. > 1 Match:
  476.     Buffer is not Large Enough:
  477.     totalMatches > actualMatches
  478.     Buffer will contain all the CIDs (equal to actualMatches), daMoreDataError error.
  479. 0 Matches:
  480.  kOCENoSuchRecord error
  481. }
  482.     AuthResolveCreationIDPB = RECORD
  483.         qLink:                    Ptr;
  484.         reserved1:                LONGINT;
  485.         reserved2:                LONGINT;
  486.         ioCompletion:            AuthIOCompletionUPP;
  487.         ioResult:                OSErr;
  488.         saveA5:                    LONGINT;
  489.         reqCode:                INTEGER;
  490.         reserved:                ARRAY [0..1] OF LONGINT;
  491.         serverHint:                AddrBlock;
  492.         dsRefNum:                INTEGER;
  493.         callID:                    LONGINT;
  494.         identity:                AuthIdentity;
  495.         gReserved1:                LONGINT;
  496.         gReserved2:                LONGINT;
  497.         gReserved3:                LONGINT;
  498.         clientData:                LONGINT;
  499.         userRecord:                RecordIDPtr;                            {  --> OCE name(Record) of the user }
  500.         bufferLength:            LONGINT;                                {  --> Buffer Size to hold duplicate Info }
  501.         buffer:                    Ptr;                                    {  --> Buffer  to hold duplicate Info }
  502.         totalMatches:            LONGINT;                                { <--  Total Number of matching names found }
  503.         actualMatches:            LONGINT;                                { <--  Number of matches returned in the buffer }
  504.     END;
  505.  
  506. {
  507. kAuthBindSpecificIdentity:
  508. userRecord will contain the user information whose identity has to be
  509. verified. userKey will contain the userKey. An Identity is returned which
  510. binds the key and the userRecord. The identity returned can be used in the 'identity'
  511. field in the header portion (AuthParamHeader) for authenticating the Catalog and
  512. Authentication manager calls.
  513. }
  514.     AuthBindSpecificIdentityPB = RECORD
  515.         qLink:                    Ptr;
  516.         reserved1:                LONGINT;
  517.         reserved2:                LONGINT;
  518.         ioCompletion:            AuthIOCompletionUPP;
  519.         ioResult:                OSErr;
  520.         saveA5:                    LONGINT;
  521.         reqCode:                INTEGER;
  522.         reserved:                ARRAY [0..1] OF LONGINT;
  523.         serverHint:                AddrBlock;
  524.         dsRefNum:                INTEGER;
  525.         callID:                    LONGINT;
  526.         identity:                AuthIdentity;
  527.         gReserved1:                LONGINT;
  528.         gReserved2:                LONGINT;
  529.         gReserved3:                LONGINT;
  530.         clientData:                LONGINT;
  531.         userIdentity:            AuthIdentity;                            { <--  binding identity }
  532.         userRecord:                RecordIDPtr;                            {  --> OCE name(Record) of the user }
  533.         userKey:                AuthKeyPtr;                                {  --> OCE Key for the user }
  534.     END;
  535.  
  536. {
  537. kAuthUnbindSpecificIdentity:
  538. This call will unbind the userRecord and key which were bind earlier.
  539. }
  540.     AuthUnbindSpecificIdentityPB = RECORD
  541.         qLink:                    Ptr;
  542.         reserved1:                LONGINT;
  543.         reserved2:                LONGINT;
  544.         ioCompletion:            AuthIOCompletionUPP;
  545.         ioResult:                OSErr;
  546.         saveA5:                    LONGINT;
  547.         reqCode:                INTEGER;
  548.         reserved:                ARRAY [0..1] OF LONGINT;
  549.         serverHint:                AddrBlock;
  550.         dsRefNum:                INTEGER;
  551.         callID:                    LONGINT;
  552.         identity:                AuthIdentity;
  553.         gReserved1:                LONGINT;
  554.         gReserved2:                LONGINT;
  555.         gReserved3:                LONGINT;
  556.         clientData:                LONGINT;
  557.         userIdentity:            AuthIdentity;                            {  --> identity to be deleted }
  558.     END;
  559.  
  560. {
  561. kAuthGetSpecificIdentityInfo:
  562. This call will return the userRecord for the given identity. Note: key is not
  563. returned because this would compromise security.
  564. }
  565.     AuthGetSpecificIdentityInfoPB = RECORD
  566.         qLink:                    Ptr;
  567.         reserved1:                LONGINT;
  568.         reserved2:                LONGINT;
  569.         ioCompletion:            AuthIOCompletionUPP;
  570.         ioResult:                OSErr;
  571.         saveA5:                    LONGINT;
  572.         reqCode:                INTEGER;
  573.         reserved:                ARRAY [0..1] OF LONGINT;
  574.         serverHint:                AddrBlock;
  575.         dsRefNum:                INTEGER;
  576.         callID:                    LONGINT;
  577.         identity:                AuthIdentity;
  578.         gReserved1:                LONGINT;
  579.         gReserved2:                LONGINT;
  580.         gReserved3:                LONGINT;
  581.         clientData:                LONGINT;
  582.         userIdentity:            AuthIdentity;                            {  --> identity of initiator }
  583.         userRecord:                RecordIDPtr;                            { <--  OCE name(Record) of the user }
  584.     END;
  585.  
  586. {
  587. kAuthAddKey:
  588. userRecord will contain the user information whose identity has to be
  589. created. userKey will point to the key to be created. password points to
  590. an RString containing the password used to generate the key.
  591. }
  592.     AuthAddKeyPB = RECORD
  593.         qLink:                    Ptr;
  594.         reserved1:                LONGINT;
  595.         reserved2:                LONGINT;
  596.         ioCompletion:            AuthIOCompletionUPP;
  597.         ioResult:                OSErr;
  598.         saveA5:                    LONGINT;
  599.         reqCode:                INTEGER;
  600.         reserved:                ARRAY [0..1] OF LONGINT;
  601.         serverHint:                AddrBlock;
  602.         dsRefNum:                INTEGER;
  603.         callID:                    LONGINT;
  604.         identity:                AuthIdentity;
  605.         gReserved1:                LONGINT;
  606.         gReserved2:                LONGINT;
  607.         gReserved3:                LONGINT;
  608.         clientData:                LONGINT;
  609.         userRecord:                RecordIDPtr;                            {  --> OCE name(Record) of the user }
  610.         userKey:                AuthKeyPtr;                                { <--  OCE Key for the user }
  611.         password:                RStringPtr;                                {  --> Pointer to password string }
  612.     END;
  613.  
  614. {
  615. kAuthChangeKey:
  616. userRecord will contain the user information whose identity has to be
  617. created. userKey will point to the key to be created. password points to
  618. an RString containing the password used to generate the key.
  619. }
  620.     AuthChangeKeyPB = RECORD
  621.         qLink:                    Ptr;
  622.         reserved1:                LONGINT;
  623.         reserved2:                LONGINT;
  624.         ioCompletion:            AuthIOCompletionUPP;
  625.         ioResult:                OSErr;
  626.         saveA5:                    LONGINT;
  627.         reqCode:                INTEGER;
  628.         reserved:                ARRAY [0..1] OF LONGINT;
  629.         serverHint:                AddrBlock;
  630.         dsRefNum:                INTEGER;
  631.         callID:                    LONGINT;
  632.         identity:                AuthIdentity;
  633.         gReserved1:                LONGINT;
  634.         gReserved2:                LONGINT;
  635.         gReserved3:                LONGINT;
  636.         clientData:                LONGINT;
  637.         userRecord:                RecordIDPtr;                            {  --> OCE name(Record) of the user }
  638.         userKey:                AuthKeyPtr;                                { <--  New OCE Key for the user }
  639.         password:                RStringPtr;                                {  -->Pointer to the new password string }
  640.     END;
  641.  
  642. {
  643. AuthDeleteKey:
  644. userRecord will contain the user information whose Key has to be deleted.
  645. }
  646.     AuthDeleteKeyPB = RECORD
  647.         qLink:                    Ptr;
  648.         reserved1:                LONGINT;
  649.         reserved2:                LONGINT;
  650.         ioCompletion:            AuthIOCompletionUPP;
  651.         ioResult:                OSErr;
  652.         saveA5:                    LONGINT;
  653.         reqCode:                INTEGER;
  654.         reserved:                ARRAY [0..1] OF LONGINT;
  655.         serverHint:                AddrBlock;
  656.         dsRefNum:                INTEGER;
  657.         callID:                    LONGINT;
  658.         identity:                AuthIdentity;
  659.         gReserved1:                LONGINT;
  660.         gReserved2:                LONGINT;
  661.         gReserved3:                LONGINT;
  662.         clientData:                LONGINT;
  663.         userRecord:                RecordIDPtr;                            {  --> OCE name(Record) of the user }
  664.     END;
  665.  
  666. { AuthPasswordToKey: Converts an RString into a key. }
  667.     AuthPasswordToKeyPB = RECORD
  668.         qLink:                    Ptr;
  669.         reserved1:                LONGINT;
  670.         reserved2:                LONGINT;
  671.         ioCompletion:            AuthIOCompletionUPP;
  672.         ioResult:                OSErr;
  673.         saveA5:                    LONGINT;
  674.         reqCode:                INTEGER;
  675.         reserved:                ARRAY [0..1] OF LONGINT;
  676.         serverHint:                AddrBlock;
  677.         dsRefNum:                INTEGER;
  678.         callID:                    LONGINT;
  679.         identity:                AuthIdentity;
  680.         gReserved1:                LONGINT;
  681.         gReserved2:                LONGINT;
  682.         gReserved3:                LONGINT;
  683.         clientData:                LONGINT;
  684.         userRecord:                RecordIDPtr;                            {  --> OCE name(Record) of the user }
  685.         key:                    AuthKeyPtr;                                { <--  }
  686.         password:                RStringPtr;                                {  -->Pointer to the new password string }
  687.     END;
  688.  
  689. {
  690. kAuthGetCredentials:
  691. userRecord will contain the user information whose identity has to be
  692. kMailDeletedMask. keyType (e.g. asDESKey) will indicate what type of key has to
  693. be deleted.
  694. }
  695.     AuthGetCredentialsPB = RECORD
  696.         qLink:                    Ptr;
  697.         reserved1:                LONGINT;
  698.         reserved2:                LONGINT;
  699.         ioCompletion:            AuthIOCompletionUPP;
  700.         ioResult:                OSErr;
  701.         saveA5:                    LONGINT;
  702.         reqCode:                INTEGER;
  703.         reserved:                ARRAY [0..1] OF LONGINT;
  704.         serverHint:                AddrBlock;
  705.         dsRefNum:                INTEGER;
  706.         callID:                    LONGINT;
  707.         identity:                AuthIdentity;
  708.         gReserved1:                LONGINT;
  709.         gReserved2:                LONGINT;
  710.         gReserved3:                LONGINT;
  711.         clientData:                LONGINT;
  712.         userIdentity:            AuthIdentity;                            {  --> identity of initiator }
  713.         recipient:                RecordIDPtr;                            {  --> OCE name of recipient }
  714.         sessionKey:                AuthKeyPtr;                                { <--  session key }
  715.         expiry:                    UTCTime;                                { <--> desired/actual expiry }
  716.         credentialsLength:        LONGINT;                                { <--> max/actual credentials size }
  717.         credentials:            Ptr;                                    { <--  buffer where credentials are returned }
  718.     END;
  719.  
  720. {
  721. AuthDecryptCredentialsPB:
  722. Changes:
  723. userKey is changed userIdentity.
  724. userRecord is changed to initiatorRecord. User must supply buffer
  725. to hold initiatorRecord.
  726. agentList has changed to agent. There wil be no call back.
  727. User must supply buffer to hold agent Record.
  728. An additional boolean parameter 'hasAgent' is included.
  729. Toolbox will set this if an 'Agent' record is found in the
  730. credentials. If RecordIDPtr is 'nil', no agent record will
  731. be copied. However user can examine 'hasAgent', If true user
  732. can reissue this call with apprpriate buffer for getting a recordID.
  733. agent has changed to intermediary.  User must supply buffer to hold 
  734. intermediary Record.  The toolbox will set 'hasIntermediary' if an
  735. 'intermediary' record is found in the credentials. 
  736. }
  737.     AuthDecryptCredentialsPB = RECORD
  738.         qLink:                    Ptr;
  739.         reserved1:                LONGINT;
  740.         reserved2:                LONGINT;
  741.         ioCompletion:            AuthIOCompletionUPP;
  742.         ioResult:                OSErr;
  743.         saveA5:                    LONGINT;
  744.         reqCode:                INTEGER;
  745.         reserved:                ARRAY [0..1] OF LONGINT;
  746.         serverHint:                AddrBlock;
  747.         dsRefNum:                INTEGER;
  748.         callID:                    LONGINT;
  749.         identity:                AuthIdentity;
  750.         gReserved1:                LONGINT;
  751.         gReserved2:                LONGINT;
  752.         gReserved3:                LONGINT;
  753.         clientData:                LONGINT;
  754.         userIdentity:            AuthIdentity;                            {  --> user's Identity }
  755.         initiatorRecord:        RecordIDPtr;                            { <--  OCE name of the initiator }
  756.         sessionKey:                AuthKeyPtr;                                { <--  session key }
  757.         expiry:                    UTCTime;                                { <--  credentials expiry time }
  758.         credentialsLength:        LONGINT;                                {  --> actual credentials size }
  759.         credentials:            Ptr;                                    {  --> credentials to be decrypted }
  760.         issueTime:                UTCTime;                                { <--  credentials expiry time }
  761.         hasIntermediary:        BOOLEAN;                                { <--  if true, An intermediary Record was found in credentials }
  762.         filler1:                BOOLEAN;
  763.         intermediary:            RecordIDPtr;                            { <--  recordID of the intermediary }
  764.     END;
  765.  
  766.     AuthMakeChallengePB = RECORD
  767.         qLink:                    Ptr;
  768.         reserved1:                LONGINT;
  769.         reserved2:                LONGINT;
  770.         ioCompletion:            AuthIOCompletionUPP;
  771.         ioResult:                OSErr;
  772.         saveA5:                    LONGINT;
  773.         reqCode:                INTEGER;
  774.         reserved:                ARRAY [0..1] OF LONGINT;
  775.         serverHint:                AddrBlock;
  776.         dsRefNum:                INTEGER;
  777.         callID:                    LONGINT;
  778.         identity:                AuthIdentity;
  779.         gReserved1:                LONGINT;
  780.         gReserved2:                LONGINT;
  781.         gReserved3:                LONGINT;
  782.         clientData:                LONGINT;
  783.         key:                    AuthKeyPtr;                                {  --> UnEncrypted SessionKey }
  784.         challenge:                Ptr;                                    { <--  Encrypted Challenge }
  785.         challengeBufferLength:    LONGINT;                                {  ->length of challenge buffer }
  786.         challengeLength:        LONGINT;                                {  <-length of Encrypted Challenge }
  787.     END;
  788.  
  789.     AuthMakeReplyPB = RECORD
  790.         qLink:                    Ptr;
  791.         reserved1:                LONGINT;
  792.         reserved2:                LONGINT;
  793.         ioCompletion:            AuthIOCompletionUPP;
  794.         ioResult:                OSErr;
  795.         saveA5:                    LONGINT;
  796.         reqCode:                INTEGER;
  797.         reserved:                ARRAY [0..1] OF LONGINT;
  798.         serverHint:                AddrBlock;
  799.         dsRefNum:                INTEGER;
  800.         callID:                    LONGINT;
  801.         identity:                AuthIdentity;
  802.         gReserved1:                LONGINT;
  803.         gReserved2:                LONGINT;
  804.         gReserved3:                LONGINT;
  805.         clientData:                LONGINT;
  806.         key:                    AuthKeyPtr;                                {  --> UnEncrypted SessionKey }
  807.         challenge:                Ptr;                                    {  --> Encrypted Challenge }
  808.         reply:                    Ptr;                                    { <--  Encrypted Reply }
  809.         replyBufferLength:        LONGINT;                                {  -->length of challenge buffer }
  810.         challengeLength:        LONGINT;                                {  --> length of Encrypted Challenge }
  811.         replyLength:            LONGINT;                                { <--  length of Encrypted Reply }
  812.     END;
  813.  
  814.     AuthVerifyReplyPB = RECORD
  815.         qLink:                    Ptr;
  816.         reserved1:                LONGINT;
  817.         reserved2:                LONGINT;
  818.         ioCompletion:            AuthIOCompletionUPP;
  819.         ioResult:                OSErr;
  820.         saveA5:                    LONGINT;
  821.         reqCode:                INTEGER;
  822.         reserved:                ARRAY [0..1] OF LONGINT;
  823.         serverHint:                AddrBlock;
  824.         dsRefNum:                INTEGER;
  825.         callID:                    LONGINT;
  826.         identity:                AuthIdentity;
  827.         gReserved1:                LONGINT;
  828.         gReserved2:                LONGINT;
  829.         gReserved3:                LONGINT;
  830.         clientData:                LONGINT;
  831.         key:                    AuthKeyPtr;                                {  --> UnEncrypted SessionKey }
  832.         challenge:                Ptr;                                    {  --> Encrypted Challenge }
  833.         reply:                    Ptr;                                    {  --> Encrypted Reply }
  834.         challengeLength:        LONGINT;                                {  --> length of Encrypted Challenge }
  835.         replyLength:            LONGINT;                                {  --> length of Encrypted Reply }
  836.     END;
  837.  
  838. {
  839. kAuthGetUTCTime:
  840. RLI will contain a valid RLI for a cluster server.
  841. UTC(GMT) time from one of the cluster server will be returned.
  842. An 'offSet' from UTC(GMT) to Mac Local Time will also be returned.
  843. If RLI is nil Map DA is used to determine UTC(GMT).
  844. Mac Local Time = theUTCTime + theUTCOffset.
  845. }
  846.     AuthGetUTCTimePB = RECORD
  847.         qLink:                    Ptr;
  848.         reserved1:                LONGINT;
  849.         reserved2:                LONGINT;
  850.         ioCompletion:            AuthIOCompletionUPP;
  851.         ioResult:                OSErr;
  852.         saveA5:                    LONGINT;
  853.         reqCode:                INTEGER;
  854.         reserved:                ARRAY [0..1] OF LONGINT;
  855.         serverHint:                AddrBlock;
  856.         dsRefNum:                INTEGER;
  857.         callID:                    LONGINT;
  858.         identity:                AuthIdentity;
  859.         gReserved1:                LONGINT;
  860.         gReserved2:                LONGINT;
  861.         gReserved3:                LONGINT;
  862.         clientData:                LONGINT;
  863.         pRLI:                    PackedRLIPtr;                            {  --> packed RLI of the Node, whose server's UTC is requested }
  864.         theUTCTime:                UTCTime;                                { <--  current UTC(GMT) Time utc seconds since 1/1/1904 }
  865.         theUTCOffset:            UTCOffset;                                { <--  offset from UTC(GMT) seconds EAST of Greenwich }
  866.     END;
  867.  
  868. {
  869. kAuthMakeProxy:
  870. A user represented bu the 'userIdentity' can make a proxy using this call.
  871. 'recipient' is the RecordID of the recipient whom user is requesting proxy.
  872. 'intermediary' is the RecordID of the intermediary holding proxy for the user.
  873. 'firstValid' is time at which proxy becomes valid.
  874. 'expiry' is the time at which proxy must expire.
  875. 'proxyLength' will have the length of the buffer pointed by 'proxy' as input.
  876. When the call completes, it will hold the actual length of proxy. If the
  877. call completes 'kOCEMoreData' error, client can reissue the call with the
  878. buffer size as 'proxyLength' returned.
  879. expiry is a suggestion, and may be adjusted to be earlier by the ADAP/OCE server.
  880. The 'proxy' obtained like this might be used by the 'intermediary' to obtain credentials
  881. for the server using TradeProxyForCredentials call.
  882. authDataLength and authData are intended for possible future work, but are
  883. ignored for now.
  884. }
  885.     AuthMakeProxyPB = RECORD
  886.         qLink:                    Ptr;
  887.         reserved1:                LONGINT;
  888.         reserved2:                LONGINT;
  889.         ioCompletion:            AuthIOCompletionUPP;
  890.         ioResult:                OSErr;
  891.         saveA5:                    LONGINT;
  892.         reqCode:                INTEGER;
  893.         reserved:                ARRAY [0..1] OF LONGINT;
  894.         serverHint:                AddrBlock;
  895.         dsRefNum:                INTEGER;
  896.         callID:                    LONGINT;
  897.         identity:                AuthIdentity;
  898.         gReserved1:                LONGINT;
  899.         gReserved2:                LONGINT;
  900.         gReserved3:                LONGINT;
  901.         clientData:                LONGINT;
  902.         userIdentity:            AuthIdentity;                            {  --> identity of principal }
  903.         recipient:                RecordIDPtr;                            {  --> OCE name of recipient }
  904.         firstValid:                UTCTime;                                {  --> time at which proxy becomes valid }
  905.         expiry:                    UTCTime;                                {  --> time at which proxy expires }
  906.         authDataLength:            LONGINT;                                {  --> size of authorization data }
  907.         authData:                Ptr;                                    {  --> pointer to authorization data }
  908.         proxyLength:            LONGINT;                                { <--> max/actual proxy size }
  909.         proxy:                    Ptr;                                    { <--> buffer where proxy is returned }
  910.         intermediary:            RecordIDPtr;                            {  --> RecordID of intermediary }
  911.     END;
  912.  
  913. {
  914. kAuthTradeProxyForCredentials:
  915. Using this call, intermediary holding a 'proxy' for a recipient may obtain credentials
  916. for that recipient. 'userIdentity' is the identity for the 'intermediary'.
  917. 'recipient' is the RecordID for whom credetials are requested.
  918. 'principal' is the RecordID of the user who created the proxy.
  919. 'proxyLength' is the length of data pointed by 'proxy.
  920. If the call is succesfull, credentials will be returned in the
  921. buffer pointed by 'credentials'. 'expiry' is the desired expiry time at input.
  922. When call succeds this will have expiry time of credentials.
  923. This is very similar to GetCredentials except that we (of course) need the proxy,
  924. but we also need the name of the principal who created the proxy.
  925. }
  926.     AuthTradeProxyForCredentialsPB = RECORD
  927.         qLink:                    Ptr;
  928.         reserved1:                LONGINT;
  929.         reserved2:                LONGINT;
  930.         ioCompletion:            AuthIOCompletionUPP;
  931.         ioResult:                OSErr;
  932.         saveA5:                    LONGINT;
  933.         reqCode:                INTEGER;
  934.         reserved:                ARRAY [0..1] OF LONGINT;
  935.         serverHint:                AddrBlock;
  936.         dsRefNum:                INTEGER;
  937.         callID:                    LONGINT;
  938.         identity:                AuthIdentity;
  939.         gReserved1:                LONGINT;
  940.         gReserved2:                LONGINT;
  941.         gReserved3:                LONGINT;
  942.         clientData:                LONGINT;
  943.         userIdentity:            AuthIdentity;                            {  --> identity of intermediary }
  944.         recipient:                RecordIDPtr;                            {  --> OCE name of recipient }
  945.         sessionKey:                AuthKeyPtr;                                { <--  session key }
  946.         expiry:                    UTCTime;                                { <--> desired/actual expiry }
  947.         credentialsLength:        LONGINT;                                { <--> max/actual credentials size }
  948.         credentials:            Ptr;                                    { <--> buffer where credentials are returned }
  949.         proxyLength:            LONGINT;                                {  --> actual proxy size }
  950.         proxy:                    Ptr;                                    {  --> buffer containing proxy }
  951.         principal:                RecordIDPtr;                            {  --> RecordID of principal }
  952.     END;
  953.  
  954. { API for Local Identity Interface }
  955. {
  956. AuthGetLocalIdentityPB:
  957. A Collaborative application intended to work under the umbrella of LocalIdentity
  958. for the OCE toolbox will have to make this call to obtain LocalIdentity.
  959. If LocalIdentity has not been setup, then application will get
  960. 'kOCEOCESetupRequired.'. In this case application should put the dialog
  961. recommended by the OCE Setup document and guide the user through OCE Setup.
  962. If the OCESetup contains local identity, but user has not unlocked, it will get
  963. kOCELocalAuthenticationFail. In this case application should use SDPPromptForLocalIdentity
  964. to prompt user for the password.
  965. If a backGround application or stand alone code requires LocalIdentity, if it gets the
  966. OSErr from LocalIdentity and can not call SDPPromptForLocalIdentity, it should it self
  967. register with the toolbox using kAuthAddToLocalIdentityQueue call. It will be notified
  968. when a LocalIdentity gets created by a foreground application.
  969. }
  970.     AuthGetLocalIdentityPB = RECORD
  971.         qLink:                    Ptr;
  972.         reserved1:                LONGINT;
  973.         reserved2:                LONGINT;
  974.         ioCompletion:            AuthIOCompletionUPP;
  975.         ioResult:                OSErr;
  976.         saveA5:                    LONGINT;
  977.         reqCode:                INTEGER;
  978.         reserved:                ARRAY [0..1] OF LONGINT;
  979.         serverHint:                AddrBlock;
  980.         dsRefNum:                INTEGER;
  981.         callID:                    LONGINT;
  982.         identity:                AuthIdentity;
  983.         gReserved1:                LONGINT;
  984.         gReserved2:                LONGINT;
  985.         gReserved3:                LONGINT;
  986.         clientData:                LONGINT;
  987.         theLocalIdentity:        LocalIdentity;                            { <--  LocalIdentity }
  988.     END;
  989.  
  990. {
  991. kAuthUnlockLocalIdentity:
  992. The LocalIdentity can be created using this call.
  993. The userName and password correspond to the LocalIdentity setup.
  994. If the password matches, then collabIdentity will be returned.
  995. Typically SDPPromptForLocalIdentity call will make this call.
  996. All applications which are registered through kAuthAddToLocalIdentityQueue
  997. will be notified.
  998. }
  999.     AuthUnlockLocalIdentityPB = RECORD
  1000.         qLink:                    Ptr;
  1001.         reserved1:                LONGINT;
  1002.         reserved2:                LONGINT;
  1003.         ioCompletion:            AuthIOCompletionUPP;
  1004.         ioResult:                OSErr;
  1005.         saveA5:                    LONGINT;
  1006.         reqCode:                INTEGER;
  1007.         reserved:                ARRAY [0..1] OF LONGINT;
  1008.         serverHint:                AddrBlock;
  1009.         dsRefNum:                INTEGER;
  1010.         callID:                    LONGINT;
  1011.         identity:                AuthIdentity;
  1012.         gReserved1:                LONGINT;
  1013.         gReserved2:                LONGINT;
  1014.         gReserved3:                LONGINT;
  1015.         clientData:                LONGINT;
  1016.         theLocalIdentity:        LocalIdentity;                            { <--  LocalIdentity }
  1017.         userName:                RStringPtr;                                {  --> userName }
  1018.         password:                RStringPtr;                                {  -->user password }
  1019.     END;
  1020.  
  1021. {
  1022. kAuthLockLocalIdentity:
  1023. With this call existing LocalIdentity can be locked. If the ASDeleteLocalIdetity
  1024. call fails with 'kOCEOperationDenied' error, name will contain the application which
  1025. denied the operation. This name will be supplied by the application
  1026. when it registered through kAuthAddToLocalIdentityQueue call
  1027. }
  1028.     AuthLockLocalIdentityPB = RECORD
  1029.         qLink:                    Ptr;
  1030.         reserved1:                LONGINT;
  1031.         reserved2:                LONGINT;
  1032.         ioCompletion:            AuthIOCompletionUPP;
  1033.         ioResult:                OSErr;
  1034.         saveA5:                    LONGINT;
  1035.         reqCode:                INTEGER;
  1036.         reserved:                ARRAY [0..1] OF LONGINT;
  1037.         serverHint:                AddrBlock;
  1038.         dsRefNum:                INTEGER;
  1039.         callID:                    LONGINT;
  1040.         identity:                AuthIdentity;
  1041.         gReserved1:                LONGINT;
  1042.         gReserved2:                LONGINT;
  1043.         gReserved3:                LONGINT;
  1044.         clientData:                LONGINT;
  1045.         theLocalIdentity:        LocalIdentity;                            {  --> LocalIdentity }
  1046.         name:                    StringPtr;                                { <--  name of the app which denied delete }
  1047.     END;
  1048.  
  1049.     NotificationProcPtr = ProcPtr;  { FUNCTION Notification(clientData: LONGINT; callValue: AuthLocalIdentityOp; actionValue: AuthLocalIdentityLockAction; identity: LocalIdentity): BOOLEAN; }
  1050.     NotificationUPP = UniversalProcPtr;
  1051.  
  1052.     NotificationProc = NotificationUPP;
  1053.  
  1054. {
  1055. kAuthAddToLocalIdentityQueue:
  1056. An application requiring notification of locking/unlocking of the
  1057. LocalIdentity can install itself using this call. The function provided
  1058. in 'notifyProc' will be called whenever the requested event happens.
  1059. When an AuthLockLocalIdentity call is made to the toolbox, the notificationProc
  1060. will be called with 'kAuthLockPending'. The application may refuse the lock by returning
  1061. a 'true' value. If all the registered entries return 'false' value, locking will be done
  1062. successfully. Otherwise 'kOCEOperationDenied' error is returned to the caller. The appName
  1063. (registered with the notificationProc) of the application which denied locking is also
  1064. returned to the caller making the AuthLockIdentity call.
  1065. }
  1066.     AuthAddToLocalIdentityQueuePB = RECORD
  1067.         qLink:                    Ptr;
  1068.         reserved1:                LONGINT;
  1069.         reserved2:                LONGINT;
  1070.         ioCompletion:            AuthIOCompletionUPP;
  1071.         ioResult:                OSErr;
  1072.         saveA5:                    LONGINT;
  1073.         reqCode:                INTEGER;
  1074.         reserved:                ARRAY [0..1] OF LONGINT;
  1075.         serverHint:                AddrBlock;
  1076.         dsRefNum:                INTEGER;
  1077.         callID:                    LONGINT;
  1078.         identity:                AuthIdentity;
  1079.         gReserved1:                LONGINT;
  1080.         gReserved2:                LONGINT;
  1081.         gReserved3:                LONGINT;
  1082.         clientData:                LONGINT;
  1083.         notifyProc:                NotificationUPP;                        {  --> notification procedure }
  1084.         notifyFlags:            AuthNotifications;                        {  --> notifyFlags }
  1085.         appName:                StringPtr;                                {  --> name of application to be returned in Delete/Stop }
  1086.     END;
  1087.  
  1088. {
  1089. kAuthRemoveFromLocalIdentityQueue:}
  1090.     AuthRemoveFromLocalIdentityQueuePB = RECORD
  1091.         qLink:                    Ptr;
  1092.         reserved1:                LONGINT;
  1093.         reserved2:                LONGINT;
  1094.         ioCompletion:            AuthIOCompletionUPP;
  1095.         ioResult:                OSErr;
  1096.         saveA5:                    LONGINT;
  1097.         reqCode:                INTEGER;
  1098.         reserved:                ARRAY [0..1] OF LONGINT;
  1099.         serverHint:                AddrBlock;
  1100.         dsRefNum:                INTEGER;
  1101.         callID:                    LONGINT;
  1102.         identity:                AuthIdentity;
  1103.         gReserved1:                LONGINT;
  1104.         gReserved2:                LONGINT;
  1105.         gReserved3:                LONGINT;
  1106.         clientData:                LONGINT;
  1107.         notifyProc:                NotificationUPP;                        {  --> notification procedure }
  1108.     END;
  1109.  
  1110. {
  1111. kAuthSetupLocalIdentity:
  1112. The LocalIdentity can be Setup using this call.
  1113. The userName and password correspond to the LocalIdentity setup.
  1114. If a LocalIdentity Setup already exists 'kOCELocalIdentitySetupExists' error
  1115. will be returned.
  1116. }
  1117.     AuthSetupLocalIdentityPB = RECORD
  1118.         qLink:                    Ptr;
  1119.         reserved1:                LONGINT;
  1120.         reserved2:                LONGINT;
  1121.         ioCompletion:            AuthIOCompletionUPP;
  1122.         ioResult:                OSErr;
  1123.         saveA5:                    LONGINT;
  1124.         reqCode:                INTEGER;
  1125.         reserved:                ARRAY [0..1] OF LONGINT;
  1126.         serverHint:                AddrBlock;
  1127.         dsRefNum:                INTEGER;
  1128.         callID:                    LONGINT;
  1129.         identity:                AuthIdentity;
  1130.         gReserved1:                LONGINT;
  1131.         gReserved2:                LONGINT;
  1132.         gReserved3:                LONGINT;
  1133.         clientData:                LONGINT;
  1134.         aReserved:                LONGINT;                                {  --  }
  1135.         userName:                RStringPtr;                                {  --> userName }
  1136.         password:                RStringPtr;                                {  -->user password }
  1137.     END;
  1138.  
  1139. {
  1140. kAuthChangeLocalIdentity:
  1141. An existing LocalIdentity  Setup can be changed using this call.
  1142. The userName and password correspond to the LocalIdentity setup.
  1143. If a LocalIdentity Setup does not exists 'kOCEOCESetupRequired' error
  1144. will be returned. The user can use  kAuthSetupLocalIdentity call to setit up.
  1145. If the 'password' does not correspond to the existing setup, 'kOCELocalAuthenticationFail'
  1146. OSErr will be returned. If successful, LocalID will have new name as 'userName' and
  1147. password as 'newPassword' and if any applications has installed into 
  1148. LocalIdentityQueue with kNotifyNameChangeMask set, it will be notified with 
  1149. kAuthLocalIdentityNameChangeOp action value. 
  1150.  
  1151. }
  1152.     AuthChangeLocalIdentityPB = RECORD
  1153.         qLink:                    Ptr;
  1154.         reserved1:                LONGINT;
  1155.         reserved2:                LONGINT;
  1156.         ioCompletion:            AuthIOCompletionUPP;
  1157.         ioResult:                OSErr;
  1158.         saveA5:                    LONGINT;
  1159.         reqCode:                INTEGER;
  1160.         reserved:                ARRAY [0..1] OF LONGINT;
  1161.         serverHint:                AddrBlock;
  1162.         dsRefNum:                INTEGER;
  1163.         callID:                    LONGINT;
  1164.         identity:                AuthIdentity;
  1165.         gReserved1:                LONGINT;
  1166.         gReserved2:                LONGINT;
  1167.         gReserved3:                LONGINT;
  1168.         clientData:                LONGINT;
  1169.         aReserved:                LONGINT;                                {  --  }
  1170.         userName:                RStringPtr;                                {  --> userName }
  1171.         password:                RStringPtr;                                {  --> current password }
  1172.         newPassword:            RStringPtr;                                {  --> new password }
  1173.     END;
  1174.  
  1175. {
  1176. kAuthRemoveLocalIdentity:
  1177. An existing LocalIdentity  Setup can be removed using this call.
  1178. The userName and password correspond to the LocalIdentity setup.
  1179. If a LocalIdentity Setup does not exists 'kOCEOCESetupRequired' error
  1180. will be returned.
  1181. If the 'password' does not correspond to the existing setup, 'kOCELocalAuthenticationFail'
  1182. OSErr will be returned. If successful, LocalIdentity will be removed from the OCE Setup.
  1183. This is a very distructive operation, user must be warned enough before actually making
  1184. this call.
  1185. }
  1186.     AuthRemoveLocalIdentityPB = RECORD
  1187.         qLink:                    Ptr;
  1188.         reserved1:                LONGINT;
  1189.         reserved2:                LONGINT;
  1190.         ioCompletion:            AuthIOCompletionUPP;
  1191.         ioResult:                OSErr;
  1192.         saveA5:                    LONGINT;
  1193.         reqCode:                INTEGER;
  1194.         reserved:                ARRAY [0..1] OF LONGINT;
  1195.         serverHint:                AddrBlock;
  1196.         dsRefNum:                INTEGER;
  1197.         callID:                    LONGINT;
  1198.         identity:                AuthIdentity;
  1199.         gReserved1:                LONGINT;
  1200.         gReserved2:                LONGINT;
  1201.         gReserved3:                LONGINT;
  1202.         clientData:                LONGINT;
  1203.         aReserved:                LONGINT;                                {  --  }
  1204.         userName:                RStringPtr;                                {  --> userName }
  1205.         password:                RStringPtr;                                {  --> current password }
  1206.     END;
  1207.  
  1208. {
  1209. kOCESetupAddDirectoryInfo:
  1210. Using this call identity for a catalog can be setup under LocalIdentity umbrella.
  1211. ASCreateLocalIdentity should have been done succesfully before making this call.
  1212. directoryRecordCID -> is the record creationID obtained when DirAddOCEDirectory or
  1213. DirAddDSAMDirectory call was made.
  1214. rid-> is the recordID in which the identity for the catalog will be established.
  1215. password-> the password associated with the rid in the catalog world.
  1216. }
  1217.     OCESetupAddDirectoryInfoPB = RECORD
  1218.         qLink:                    Ptr;
  1219.         reserved1:                LONGINT;
  1220.         reserved2:                LONGINT;
  1221.         ioCompletion:            AuthIOCompletionUPP;
  1222.         ioResult:                OSErr;
  1223.         saveA5:                    LONGINT;
  1224.         reqCode:                INTEGER;
  1225.         reserved:                ARRAY [0..1] OF LONGINT;
  1226.         serverHint:                AddrBlock;
  1227.         dsRefNum:                INTEGER;
  1228.         callID:                    LONGINT;
  1229.         identity:                AuthIdentity;
  1230.         gReserved1:                LONGINT;
  1231.         gReserved2:                LONGINT;
  1232.         gReserved3:                LONGINT;
  1233.         clientData:                LONGINT;
  1234.         directoryRecordCID:        CreationID;                                {  --> CreationID for the catalog }
  1235.         recordID:                RecordIDPtr;                            {  --> recordID for the identity }
  1236.         password:                RStringPtr;                                {  --> password in the catalog world }
  1237.     END;
  1238.  
  1239. {
  1240. kOCESetupChangeDirectoryInfo:
  1241. Using this call an existing identity for a catalog under LocalIdentity umbrella
  1242. can be changed.
  1243. ASCreateLocalIdentity should have been done succesfully before making this call.
  1244. directoryRecordCID -> is the record creationID obtained when DirAddOCEDirectory or
  1245. DirAddDSAMDirectory call was made.
  1246. rid-> is the recordID in which the identity for the catalog will be established.
  1247. password-> the password associated with the rid in the catalog world.
  1248. newPassword -> the new password for the catalog
  1249. }
  1250.     OCESetupChangeDirectoryInfoPB = RECORD
  1251.         qLink:                    Ptr;
  1252.         reserved1:                LONGINT;
  1253.         reserved2:                LONGINT;
  1254.         ioCompletion:            AuthIOCompletionUPP;
  1255.         ioResult:                OSErr;
  1256.         saveA5:                    LONGINT;
  1257.         reqCode:                INTEGER;
  1258.         reserved:                ARRAY [0..1] OF LONGINT;
  1259.         serverHint:                AddrBlock;
  1260.         dsRefNum:                INTEGER;
  1261.         callID:                    LONGINT;
  1262.         identity:                AuthIdentity;
  1263.         gReserved1:                LONGINT;
  1264.         gReserved2:                LONGINT;
  1265.         gReserved3:                LONGINT;
  1266.         clientData:                LONGINT;
  1267.         directoryRecordCID:        CreationID;                                {  --> CreationID for the catalog }
  1268.         recordID:                RecordIDPtr;                            {  --> recordID for the identity }
  1269.         password:                RStringPtr;                                {  --> password in the catalog world }
  1270.         newPassword:            RStringPtr;                                {  --> new password in the catalog }
  1271.     END;
  1272.  
  1273. {
  1274. kOCESetupRemoveDirectoryInfo:
  1275. Using this call an existing identity for a catalog under LocalIdentity umbrella
  1276. can be changed.
  1277. ASCreateLocalIdentity should have been done succesfully before making this call.
  1278. directoryRecordCID -> is the record creationID obtained when DirAddOCEDirectory or
  1279. }
  1280.     OCESetupRemoveDirectoryInfoPB = RECORD
  1281.         qLink:                    Ptr;
  1282.         reserved1:                LONGINT;
  1283.         reserved2:                LONGINT;
  1284.         ioCompletion:            AuthIOCompletionUPP;
  1285.         ioResult:                OSErr;
  1286.         saveA5:                    LONGINT;
  1287.         reqCode:                INTEGER;
  1288.         reserved:                ARRAY [0..1] OF LONGINT;
  1289.         serverHint:                AddrBlock;
  1290.         dsRefNum:                INTEGER;
  1291.         callID:                    LONGINT;
  1292.         identity:                AuthIdentity;
  1293.         gReserved1:                LONGINT;
  1294.         gReserved2:                LONGINT;
  1295.         gReserved3:                LONGINT;
  1296.         clientData:                LONGINT;
  1297.         directoryRecordCID:        CreationID;                                {  --> CreationID for the catalog }
  1298.     END;
  1299.  
  1300. {
  1301. kOCESetupGetDirectoryInfo:
  1302. Using this call info on an existing identity for a particular catalog under LocalIdentity umbrella
  1303. can be obtained.
  1304. For the specified catalog 'directoryName' and 'discriminator', rid and nativeName will
  1305. returned. Caller must provide appropriate buffer to get back rid and nativeName.
  1306. 'password' will be returned  for  non-ADAP Catalogs.
  1307. }
  1308.     OCESetupGetDirectoryInfoPB = RECORD
  1309.         qLink:                    Ptr;
  1310.         reserved1:                LONGINT;
  1311.         reserved2:                LONGINT;
  1312.         ioCompletion:            AuthIOCompletionUPP;
  1313.         ioResult:                OSErr;
  1314.         saveA5:                    LONGINT;
  1315.         reqCode:                INTEGER;
  1316.         reserved:                ARRAY [0..1] OF LONGINT;
  1317.         serverHint:                AddrBlock;
  1318.         dsRefNum:                INTEGER;
  1319.         callID:                    LONGINT;
  1320.         identity:                AuthIdentity;
  1321.         gReserved1:                LONGINT;
  1322.         gReserved2:                LONGINT;
  1323.         gReserved3:                LONGINT;
  1324.         clientData:                LONGINT;
  1325.         directoryName:            DirectoryNamePtr;                        {  --> catalog name }
  1326.         discriminator:            DirDiscriminator;                        {  --> discriminator for the catalog }
  1327.         recordID:                RecordIDPtr;                            { <--  rid for the catalog identity }
  1328.         nativeName:                RStringPtr;                                { <--  user name in the catalog world }
  1329.         password:                RStringPtr;                                { <--  password in the catalog world }
  1330.     END;
  1331.  
  1332. {****************************************************************************
  1333.  
  1334.  
  1335.          Catalog Manager operations
  1336.  
  1337.  
  1338. ****************************************************************************}
  1339.     DirParamBlockPtr = ^DirParamBlock;
  1340.  
  1341.     DirIOCompletionProcPtr = ProcPtr;  { PROCEDURE DirIOCompletion(paramBlock: DirParamBlockPtr); }
  1342.     DirIOCompletionUPP = UniversalProcPtr;
  1343.  
  1344. { AddRecord }
  1345.     DirAddRecordPB = RECORD
  1346.         qLink:                    Ptr;
  1347.         reserved1:                LONGINT;
  1348.         reserved2:                LONGINT;
  1349.         ioCompletion:            DirIOCompletionUPP;
  1350.         ioResult:                OSErr;
  1351.         saveA5:                    LONGINT;
  1352.         reqCode:                INTEGER;
  1353.         reserved:                ARRAY [0..1] OF LONGINT;
  1354.         serverHint:                AddrBlock;
  1355.         dsRefNum:                INTEGER;
  1356.         callID:                    LONGINT;
  1357.         identity:                AuthIdentity;
  1358.         gReserved1:                LONGINT;
  1359.         gReserved2:                LONGINT;
  1360.         gReserved3:                LONGINT;
  1361.         clientData:                LONGINT;
  1362.         aRecord:                RecordIDPtr;                            {  --> CreationID returned here }
  1363.         allowDuplicate:            BOOLEAN;                                {  --> }
  1364.         filler1:                BOOLEAN;
  1365.     END;
  1366.  
  1367. { DeleteRecord }
  1368.     DirDeleteRecordPB = RECORD
  1369.         qLink:                    Ptr;
  1370.         reserved1:                LONGINT;
  1371.         reserved2:                LONGINT;
  1372.         ioCompletion:            DirIOCompletionUPP;
  1373.         ioResult:                OSErr;
  1374.         saveA5:                    LONGINT;
  1375.         reqCode:                INTEGER;
  1376.         reserved:                ARRAY [0..1] OF LONGINT;
  1377.         serverHint:                AddrBlock;
  1378.         dsRefNum:                INTEGER;
  1379.         callID:                    LONGINT;
  1380.         identity:                AuthIdentity;
  1381.         gReserved1:                LONGINT;
  1382.         gReserved2:                LONGINT;
  1383.         gReserved3:                LONGINT;
  1384.         clientData:                LONGINT;
  1385.         aRecord:                RecordIDPtr;                            {  --> }
  1386.     END;
  1387.  
  1388. { aRecord must contain valid PackedRLI and a CreationID. }
  1389. {********************************************************************************}
  1390. {
  1391. DirEnumerate:
  1392. This call can be used to enumerate both DNodes and records under a specified
  1393. DNode. A DNode is specified by the PackedRLIPtr 'aRLI'.
  1394.  
  1395. startingPoint indicates where to start the enumeration.  Initially,
  1396. it should be set to a value of nil.  After some records are enumerated,
  1397. the client can issue the call again with the same aRLI and recordName and
  1398. typeList. The last received DirEnumSpec in the startingPoint field.  The server
  1399. will continue the enumeration from that record on. if user wants to get back the
  1400. value specified in the startingRecord also, the Boolean 'includeStartingPoint'
  1401. must be set to 'true'. If this is set to 'false', records specified after the
  1402. startingPoint record will be returned.
  1403.  
  1404. sortBy indicates to the server to return the records that match in name-first
  1405. or type-first order.  sortDirection indicates to the server to search in forward
  1406. or backward sort order for RecordIDs Specified.
  1407.  
  1408. RecordIDS and Enumeration Criteria:
  1409.  
  1410. PackedRLIPtr parameter 'aRLI' will be accepted for DNode
  1411. specification.
  1412.  
  1413. One RStringPtr 'nameMatchString' is provided. User is allowed to
  1414. specify a wild card in the name. WildCard specification is specified in 
  1415. matchNameHow parameter and possible values are defined in DirMatchWith Enum.
  1416.  
  1417. 'typeCount' parameter indicate how many types are in the 'typeList'.
  1418.  
  1419. 'typeList' parmeter is a pointer to an RString array of size 'typeCount'.
  1420.  
  1421. If 'typeCount' is exactly equal to one, a wild card can be specified
  1422. for the entity type; otherwise types have to be completely specified.
  1423. WildCard specification is specified in  matchNameHow parameter
  1424.  and possible values are defined in DirMatchWith Enum.
  1425.  
  1426.  
  1427. A nil value for 'startingPoint' is allowed when sortDirection specified
  1428. is 'kSortBackwards'. This was not allowed previously.
  1429.  
  1430. 'enumFlags' parameter is a bit field. The following bits can be set:
  1431.     kEnumDistinguishedNameMask to get back records in the cluster data base.
  1432.     kEnumAliasMask to get back record aliases
  1433.     kEnumPseudonymMask to get back record pseudonyms
  1434.     kEnumDNodeMask to get back any children dNodes for the DNode specified in the
  1435.     'aRLI' parameter.
  1436.     kEnumForeignDNodeMask to get back any children dNodes which have ForeignDnodes in the
  1437.     dNode specified in the 'aRLI' parameter.
  1438.  
  1439.     kEnumAll is combination of all five values and can be used to enumerate
  1440.     everything under a specified DNode.
  1441.  
  1442.  
  1443.  
  1444. The results returned for each element will consist of a DirEnumSpec.
  1445. The DirEnumSpec contains 'enumFlag' which indicates the type of entity and a
  1446. union which will have either DNodeID or LocalRecordID depending on the value of 'enumFlag'.
  1447. The 'enumFlag'  will indicate whether the returned element is a
  1448. record(kEnumDistinguishedNameMask bit) or a alias(kEnumAliasMask bit) or a
  1449. Pseudonym(kEnumPseudonymMask) or a child DNode(kEnumDNodeMask bit).  If the 'enumFlag' value
  1450. is kEnumDnodeMask, it indicates the value returned in the union is a DNodeID (i.e. 'dNodeNumber'
  1451. is the 'dNodeNumber' of the child dnode(if the catalog supports dNodeNumbers, otherwise
  1452. this will be set to zero). The name will be the child dnode name. For other values of the
  1453. 'enumFlag', the value in the union will be LocalRecordID. In addition to kEnumDnodeMask it is
  1454. possible that kEnumForeignDNodeMask is also set. This is an advisory bit and application must make
  1455. it's own decision before displaying these records. If catalog supports kSupportIndexRatioMask, it
  1456. may also return the relative position of the record (percentile of total records) in the 
  1457. indexRatio field in EnumSpec.
  1458.  
  1459.  
  1460. responseSLRV will contain the script, language, region and version of the oce sorting software.
  1461. The results will be collected in the 'getBuffer' supplied by the user.
  1462. If buffer can not hold all the data returned 'kOCEMoreData' error will be returned.
  1463.  
  1464. If user receives 'noErr' or 'kOCEMoreData', buffer will contain valid results. A user
  1465. can extract the results in the 'getBuffer' by making DirEnumerateParse' call.
  1466. }
  1467.     DirEnumerateGetPB = RECORD
  1468.         qLink:                    Ptr;
  1469.         reserved1:                LONGINT;
  1470.         reserved2:                LONGINT;
  1471.         ioCompletion:            DirIOCompletionUPP;
  1472.         ioResult:                OSErr;
  1473.         saveA5:                    LONGINT;
  1474.         reqCode:                INTEGER;
  1475.         reserved:                ARRAY [0..1] OF LONGINT;
  1476.         serverHint:                AddrBlock;
  1477.         dsRefNum:                INTEGER;
  1478.         callID:                    LONGINT;
  1479.         identity:                AuthIdentity;
  1480.         gReserved1:                LONGINT;
  1481.         gReserved2:                LONGINT;
  1482.         gReserved3:                LONGINT;
  1483.         clientData:                LONGINT;
  1484.         aRLI:                    PackedRLIPtr;                            {  --> an RLI specifying the cluster to be enumerated }
  1485.         startingPoint:            ^DirEnumSpec;                            {  --> }
  1486.         sortBy:                    DirSortOption;                            {  --> }
  1487.         sortDirection:            DirSortDirection;                        {  --> }
  1488.         dReserved:                LONGINT;                                {  --  }
  1489.         nameMatchString:        RStringPtr;                                {  --> name from which enumeration should start }
  1490.         typesList:                ^RStringPtr;                            {  --> list of entity types to be enumerated }
  1491.         typeCount:                LONGINT;                                {  --> number of types in the list }
  1492.         enumFlags:                DirEnumChoices;                            {  --> indicates what to enumerate }
  1493.         includeStartingPoint:    BOOLEAN;                                {  --> if true return the record specified in starting point }
  1494.         padByte:                SInt8; (* Byte *)
  1495.         matchNameHow:            DirMatchWith;                            {  --> Matching Criteria for nameMatchString }
  1496.         matchTypeHow:            DirMatchWith;                            {  --> Matching Criteria for typeList }
  1497.         getBuffer:                Ptr;                                    {  --> }
  1498.         getBufferSize:            LONGINT;                                {  --> }
  1499.         responseSLRV:            SLRV;                                    {  <--  response SLRV }
  1500.     END;
  1501.  
  1502. { The EnumerateRecords call-back function is defined as follows: }
  1503.     ForEachDirEnumSpecProcPtr = ProcPtr;  { FUNCTION ForEachDirEnumSpec(clientData: LONGINT; (CONST)VAR enumSpec: DirEnumSpec): BOOLEAN; }
  1504.     ForEachDirEnumSpecUPP = UniversalProcPtr;
  1505.  
  1506.     ForEachDirEnumSpec = ForEachDirEnumSpecUPP;
  1507.  
  1508. {
  1509. EnumerateParse:
  1510. After an EnumerateGet call has completed, call EnumerateParse
  1511. to parse through the buffer that was filled in EnumerateGet.
  1512.  
  1513. 'eachEnumSpec' will be called each time to return to the client a
  1514. DirEnumSpec that matches the pattern for enumeration. 'enumFlag' indicates the type
  1515. of information returned in the DirEnumSpec
  1516. The clientData parameter that you pass in the parameter block will be passed
  1517. to 'forEachEnumDSSpecFunc'.  You are free to put anything in clientData - it is intended
  1518. to allow you some way to match the call-back to the original call (for
  1519. example, you make more then one aysynchronous EnumerateGet calls and you want to
  1520. associate returned results in some way).
  1521.  
  1522. The client should return FALSE from 'eachEnumSpec' to continue
  1523. processing of the EnumerateParse request.  Returning TRUE will
  1524. terminate the EnumerateParse request.
  1525.  
  1526. For synchronous calls, the call-back routine actually runs as part of the same thread
  1527. of execution as the thread that made the EnumerateParse call.  That means that the
  1528. same low-memory globals, A5, stack, etc. are in effect during the call-back
  1529. that were in effect when the call was made.  Because of this, the call-back
  1530. routine has the same restrictions as the caller of EnumerateParse:
  1531. if EnumerateParse was not called from interrupt level, then the call-
  1532. back routine can allocate memory. For asynchronous calls, call-back routine is
  1533. like a ioCompletion except that A5 will be preserved for the application.
  1534. }
  1535.     DirEnumerateParsePB = RECORD
  1536.         qLink:                    Ptr;
  1537.         reserved1:                LONGINT;
  1538.         reserved2:                LONGINT;
  1539.         ioCompletion:            DirIOCompletionUPP;
  1540.         ioResult:                OSErr;
  1541.         saveA5:                    LONGINT;
  1542.         reqCode:                INTEGER;
  1543.         reserved:                ARRAY [0..1] OF LONGINT;
  1544.         serverHint:                AddrBlock;
  1545.         dsRefNum:                INTEGER;
  1546.         callID:                    LONGINT;
  1547.         identity:                AuthIdentity;
  1548.         gReserved1:                LONGINT;
  1549.         gReserved2:                LONGINT;
  1550.         gReserved3:                LONGINT;
  1551.         clientData:                LONGINT;
  1552.         aRLI:                    PackedRLIPtr;                            {  --> an RLI specifying the cluster to be enumerated }
  1553.         bReserved:                LONGINT;                                {  --  }
  1554.         cReserved:                LONGINT;                                {  --  }
  1555.         eachEnumSpec:            ForEachDirEnumSpec;                        {  --> }
  1556.         eReserved:                LONGINT;                                {  --  }
  1557.         fReserved:                LONGINT;                                {  --  }
  1558.         gReserved:                LONGINT;                                {  --  }
  1559.         hReserved:                LONGINT;                                {  --  }
  1560.         iReserved:                LONGINT;                                {  --  }
  1561.         getBuffer:                Ptr;                                    {  --> }
  1562.         getBufferSize:            LONGINT;                                {  --> }
  1563.         l1Reserved:                INTEGER;                                {  -- }
  1564.         l2Reserved:                INTEGER;                                {  --  }
  1565.         l3Reserved:                INTEGER;                                {  -- }
  1566.         l4Reserved:                INTEGER;                                {  --  }
  1567.     END;
  1568.  
  1569. {
  1570.  * FindRecordGet operates similarly to DirEnumerate except it returns a list
  1571.  * of records instead of records local to a cluster.
  1572. }
  1573.     DirFindRecordGetPB = RECORD
  1574.         qLink:                    Ptr;
  1575.         reserved1:                LONGINT;
  1576.         reserved2:                LONGINT;
  1577.         ioCompletion:            DirIOCompletionUPP;
  1578.         ioResult:                OSErr;
  1579.         saveA5:                    LONGINT;
  1580.         reqCode:                INTEGER;
  1581.         reserved:                ARRAY [0..1] OF LONGINT;
  1582.         serverHint:                AddrBlock;
  1583.         dsRefNum:                INTEGER;
  1584.         callID:                    LONGINT;
  1585.         identity:                AuthIdentity;
  1586.         gReserved1:                LONGINT;
  1587.         gReserved2:                LONGINT;
  1588.         gReserved3:                LONGINT;
  1589.         clientData:                LONGINT;
  1590.         startingPoint:            RecordIDPtr;
  1591.         reservedA:                ARRAY [0..1] OF LONGINT;
  1592.         nameMatchString:        RStringPtr;
  1593.         typesList:                ^RStringPtr;
  1594.         typeCount:                LONGINT;
  1595.         reservedB:                LONGINT;
  1596.         reservedC:                INTEGER;
  1597.         matchNameHow:            DirMatchWith;
  1598.         matchTypeHow:            DirMatchWith;
  1599.         getBuffer:                Ptr;
  1600.         getBufferSize:            LONGINT;
  1601.         directoryName:            DirectoryNamePtr;
  1602.         discriminator:            DirDiscriminator;
  1603.     END;
  1604.  
  1605. { The FindRecordParse call-back function is defined as follows: }
  1606.     ForEachRecordProcPtr = ProcPtr;  { FUNCTION ForEachRecord(clientData: LONGINT; (CONST)VAR enumSpec: DirEnumSpec; pRLI: PackedRLIPtr): BOOLEAN; }
  1607.     ForEachRecordUPP = UniversalProcPtr;
  1608.  
  1609.     ForEachRecord = ForEachRecordUPP;
  1610.  
  1611. {
  1612.  * This PB same as DirFindRecordGet except it includes the callback function
  1613. }
  1614.     DirFindRecordParsePB = RECORD
  1615.         qLink:                    Ptr;
  1616.         reserved1:                LONGINT;
  1617.         reserved2:                LONGINT;
  1618.         ioCompletion:            DirIOCompletionUPP;
  1619.         ioResult:                OSErr;
  1620.         saveA5:                    LONGINT;
  1621.         reqCode:                INTEGER;
  1622.         reserved:                ARRAY [0..1] OF LONGINT;
  1623.         serverHint:                AddrBlock;
  1624.         dsRefNum:                INTEGER;
  1625.         callID:                    LONGINT;
  1626.         identity:                AuthIdentity;
  1627.         gReserved1:                LONGINT;
  1628.         gReserved2:                LONGINT;
  1629.         gReserved3:                LONGINT;
  1630.         clientData:                LONGINT;
  1631.         startingPoint:            RecordIDPtr;
  1632.         reservedA:                ARRAY [0..1] OF LONGINT;
  1633.         nameMatchString:        RStringPtr;
  1634.         typesList:                ^RStringPtr;
  1635.         typeCount:                LONGINT;
  1636.         reservedB:                LONGINT;
  1637.         reservedC:                INTEGER;
  1638.         matchNameHow:            DirMatchWith;
  1639.         matchTypeHow:            DirMatchWith;
  1640.         getBuffer:                Ptr;
  1641.         getBufferSize:            LONGINT;
  1642.         directoryName:            DirectoryNamePtr;
  1643.         discriminator:            DirDiscriminator;
  1644.         forEachRecordFunc:        ForEachRecord;
  1645.     END;
  1646.  
  1647. {
  1648. LookupGet:
  1649.  
  1650. aRecordList is an array of pointers to RecordIDs, each of which must
  1651. contain valid PackedRLI and a CreationID.  recordIDCount is
  1652. the size of this array.
  1653.  
  1654. attrTypeList is an array of pointers to AttributeTypes.  attrTypeCount is
  1655. the size of this array.
  1656.  
  1657. staringRecordIndex is the record from which to continue the lookup.
  1658. If you want to start from first record in the list, this must be 1 (not zero).
  1659. This value must always be <= recordIDCount.
  1660.  
  1661. startingAttributeIndex is the AttributeType from which we want to continue the lookup.
  1662. If you want to start from first attribute in the list, this must be 1 (not zero).
  1663. This value must always be <= attrTypeCount.
  1664.  
  1665. startingAttribute is the value of the attribute value from which we want to
  1666. continue lookup. In case of catalogs supporting creationIDs, startingAttribute
  1667. may contain only a CID. Other catalogs may require the entire value.
  1668. If a non-null cid is given and if an attribute value with that cid is not found, this
  1669. call will terminate with kOCENoSuchAttribute error. A client should not make a LookupParse call
  1670. after getting this error.
  1671.  
  1672. 'includeStartingPoint' boolean can be set to 'true' to receive the value specified in the
  1673. startingPoint in the results returned. If this is set to 'false', the value
  1674. specified in the startingAttribute will not be returned.
  1675.  
  1676. When LookupGet call fails with kOCEMoreData, the client will be able to find out where the call ended
  1677. with a subsequent LookupParse call. When the LookupParse call completes with kOCEMoreData,
  1678. lastRecordIndex, lastAttributeIndex and lastValueCID will point to the corresponding
  1679. recordID, attributeType and the CreationID of the last value returned successfully. These parameters
  1680. are exactly the same ones for the startingRecordIndex, startingAttributeIndex, and startingAttrValueCID
  1681. so they can be used in a subsequent LookupGet call to continue the lookup.
  1682.  
  1683. In an extreme case, It is possible that we had an attribute value that is too large to fit
  1684. in the client's buffer. In such cases, if it was the only thing that we tried to fit
  1685. into the buffer, the client will not able to proceed further because he will not know the
  1686. attributeCID of the attribute to continue with.  Also he does not know how big a buffer
  1687. would be needed for the next call to get this 'mondo' attribute value successfully.
  1688.  
  1689. to support this, LookupParse call will do the following:
  1690.  
  1691. If LookupGet has failed with kOCEMoreData error, LookupParse will check to make sure that
  1692. ForEachAttributeValueFunc has been called at least once. If so, the client has the option
  1693. to continue from that attribute CreationID (for PAB/ADAP) in the next LookupGet call.
  1694. However, if it was not even called once, then the attribute value may be too big to fit in the
  1695. user's buffer. In this case, lastAttrValueCID (lastAttribute) and attrSize are returned in the
  1696. parse buffer and the call will fail with kOCEMoreAttrValue. However, it is possible that
  1697. ForEachAttributeValue was not called because the user does not have read access to some of
  1698. the attributeTypes in the list, and the buffer was full before even reading the creationID of
  1699. any of the attribute values.  A kOCEMoreData error is returned.
  1700.  
  1701. The Toolbox will check for duplicate RecordIDs in the aRecordList. If found, it will return
  1702. 'daDuplicateRecordIDErr'.
  1703.  
  1704. The Toolbox will check for duplicate AttributeTypes in the attrTypeList. If found it will
  1705. return 'daDuplicateAttrTypeErr'.
  1706. }
  1707.     DirLookupGetPB = RECORD
  1708.         qLink:                    Ptr;
  1709.         reserved1:                LONGINT;
  1710.         reserved2:                LONGINT;
  1711.         ioCompletion:            DirIOCompletionUPP;
  1712.         ioResult:                OSErr;
  1713.         saveA5:                    LONGINT;
  1714.         reqCode:                INTEGER;
  1715.         reserved:                ARRAY [0..1] OF LONGINT;
  1716.         serverHint:                AddrBlock;
  1717.         dsRefNum:                INTEGER;
  1718.         callID:                    LONGINT;
  1719.         identity:                AuthIdentity;
  1720.         gReserved1:                LONGINT;
  1721.         gReserved2:                LONGINT;
  1722.         gReserved3:                LONGINT;
  1723.         clientData:                LONGINT;
  1724.         aRecordList:            ^RecordIDPtr;                            {  --> an array of RecordID pointers }
  1725.         attrTypeList:            ^AttributeTypePtr;                        {  --> an array of attribute types }
  1726.         cReserved:                LONGINT;                                {  --  }
  1727.         dReserved:                LONGINT;                                {  --  }
  1728.         eReserved:                LONGINT;                                {  --  }
  1729.         fReserved:                LONGINT;                                {  --  }
  1730.         recordIDCount:            LONGINT;                                {  --> }
  1731.         attrTypeCount:            LONGINT;                                {  --> }
  1732.         includeStartingPoint:    BOOLEAN;                                {  --> if true return the value specified by the starting indices }
  1733.         padByte:                SInt8; (* Byte *)
  1734.         i1Reserved:                INTEGER;                                {  --  }
  1735.         getBuffer:                Ptr;                                    {  --> }
  1736.         getBufferSize:            LONGINT;                                {  --> }
  1737.         startingRecordIndex:    LONGINT;                                {  --> start from this record }
  1738.         startingAttrTypeIndex:    LONGINT;                                {  --> start from this attribute type }
  1739.         startingAttribute:        Attribute;                                {  --> start from this attribute value }
  1740.         pReserved:                LONGINT;                                {  --  }
  1741.     END;
  1742.  
  1743. { The Lookup call-back functions are defined as follows: }
  1744.     ForEachLookupRecordIDProcPtr = ProcPtr;  { FUNCTION ForEachLookupRecordID(clientData: LONGINT; (CONST)VAR recordID: RecordID): BOOLEAN; }
  1745.     ForEachLookupRecordIDUPP = UniversalProcPtr;
  1746.  
  1747.     ForEachLookupRecordID = ForEachLookupRecordIDUPP;
  1748.  
  1749.     ForEachAttrTypeLookupProcPtr = ProcPtr;  { FUNCTION ForEachAttrTypeLookup(clientData: LONGINT; (CONST)VAR attrType: AttributeType; myAttrAccMask: AccessMask): BOOLEAN; }
  1750.     ForEachAttrTypeLookupUPP = UniversalProcPtr;
  1751.  
  1752.     ForEachAttrTypeLookup = ForEachAttrTypeLookupUPP;
  1753.  
  1754.     ForEachAttrValueProcPtr = ProcPtr;  { FUNCTION ForEachAttrValue(clientData: LONGINT; (CONST)VAR attribute: Attribute): BOOLEAN; }
  1755.     ForEachAttrValueUPP = UniversalProcPtr;
  1756.  
  1757.     ForEachAttrValue = ForEachAttrValueUPP;
  1758.  
  1759. {
  1760. LookupParse:
  1761.  
  1762. After a LookupGet call has completed, call LookupParse
  1763. to parse through the buffer that was filled in LookupGet.  The
  1764. toolbox will parse through the buffer and call the appropriate call-back routines
  1765. for each item in the getBuffer.
  1766.  
  1767. 'eachRecordID' will be called each time to return to the client one of the
  1768. RecordIDs from aRecordList.  The clientData parameter that you
  1769. pass in the parameter block will be passed to eachRecordID.
  1770. You are free to put anything in clientData - it is intended to allow
  1771. you some way to match the call-back to the original call (in case, for
  1772. example, you make simultaneous asynchronous LookupGet calls).  If you don't
  1773. want to get a call-back for each RecordID (for example, if you're looking up
  1774. attributes for only one RecordID), pass nil for eachRecordID.
  1775.  
  1776. After forEachLocalRecordIDFunc is called, eachAttrType may be called to pass an
  1777. attribute type (one from attrTypeList) that exists in the record specified
  1778. in the last eachRecordID call.  If you don't want to get a call-back for
  1779. each AttributeType (for example, if you're looking up only one attribute type,
  1780. or you prefer to read the type from the Attribute struct during the eachAttrValue
  1781. call-back routine), pass nil for eachAttrType. However access controls may
  1782. prohibit you from reading some attribute types; in that case eachAttrValue
  1783. may not be called even though the value exists. Hence the client should
  1784. supply this call-back function to see the access controls for each attribute type.
  1785.  
  1786. This will be followed by one or more calls to eachAttrValue, to pass the
  1787. type, tag, and attribute value.  NOTE THIS CHANGE:  you are no longer expected to
  1788. pass a pointer to a buffer in which to put the value.  Now you get a pointer to
  1789. the value, and you can process it within the call-back routine.
  1790. After one or more values are returned, eachAttrType may be called again to pass
  1791. another attribute type that exists in the last-specified RecordID.
  1792.  
  1793. The client should return FALSE from eachRecordID, eachAttrType, and
  1794. eachAttrValue to continue processing of the LookupParse request.  Returning TRUE
  1795. from any call-back will terminate the LookupParse request.
  1796.  
  1797. If LookupGet has failed with kOCEMoreData error, LookupParse will check to make sure that
  1798. ForEachAttributeValueFunc has been called at least once. If so, the client has the option
  1799. to continue from that attribute CreationID (for PAB/ADAP) in the next LookupGet call.
  1800. However, if it was not even called once, then the attribute value may be too big to fit in the
  1801. user's buffer. In this case, lastAttrValueCID (lastAttribute) and attrSize are returned in the
  1802. parse buffer and the call will fail with kOCEMoreAttrValue. However, it is possible that
  1803. ForEachAttributeValue was not called because the user does not have read access to some of
  1804. the attributeTypes in the list, and the buffer was full before even reading the creationID of
  1805. any of the attribute values.  A kOCEMoreData error is returned.
  1806.  
  1807. For synchronous calls, the call-back routine actually runs as part of the same thread
  1808. of execution as the thread that made the LookupParse call.  That means that the
  1809. same low-memory globals, A5, stack, etc. are in effect during the call-back
  1810. that were in effect when the call was made.  Because of this, the call-back
  1811. routine has the same restrictions as the caller of LookupParse:
  1812. if LookupParse was not called from interrupt level, then the call-
  1813. back routine can allocate memory. For asynchronous calls, call-back routine is
  1814. like a ioCompletion except that A5 will be preserved for the application.
  1815. }
  1816.     DirLookupParsePB = RECORD
  1817.         qLink:                    Ptr;
  1818.         reserved1:                LONGINT;
  1819.         reserved2:                LONGINT;
  1820.         ioCompletion:            DirIOCompletionUPP;
  1821.         ioResult:                OSErr;
  1822.         saveA5:                    LONGINT;
  1823.         reqCode:                INTEGER;
  1824.         reserved:                ARRAY [0..1] OF LONGINT;
  1825.         serverHint:                AddrBlock;
  1826.         dsRefNum:                INTEGER;
  1827.         callID:                    LONGINT;
  1828.         identity:                AuthIdentity;
  1829.         gReserved1:                LONGINT;
  1830.         gReserved2:                LONGINT;
  1831.         gReserved3:                LONGINT;
  1832.         clientData:                LONGINT;
  1833.         aRecordList:            ^RecordIDPtr;                            {  --> must be same from the corresponding Get call }
  1834.         attrTypeList:            ^AttributeTypePtr;                        {  --> must be same from the corresponding Get call }
  1835.         cReserved:                LONGINT;                                {  --  }
  1836.         eachRecordID:            ForEachLookupRecordID;                    {  --> }
  1837.         eachAttrType:            ForEachAttrTypeLookup;                    {  --> }
  1838.         eachAttrValue:            ForEachAttrValue;                        {  --> }
  1839.         recordIDCount:            LONGINT;                                {  --> must be same from the corresponding Get call }
  1840.         attrTypeCount:            LONGINT;                                {  --> must be same from the corresponding Get call }
  1841.         iReserved:                LONGINT;                                {  --  }
  1842.         getBuffer:                Ptr;                                    {  --> must be same from the corresponding Get call}
  1843.         getBufferSize:            LONGINT;                                {  --> must be same from the corresponding Get call}
  1844.         lastRecordIndex:        LONGINT;                                { <--  last RecordID processed when parse completed }
  1845.         lastAttributeIndex:        LONGINT;                                { <--  last Attribute Type processed when parse completed }
  1846.         lastAttribute:            Attribute;                                { <--  last attribute value (with this CreationID) processed when parse completed }
  1847.         attrSize:                LONGINT;                                { <--  length of the attribute we did not return }
  1848.     END;
  1849.  
  1850. { AddAttributeValue }
  1851.     DirAddAttributeValuePB = RECORD
  1852.         qLink:                    Ptr;
  1853.         reserved1:                LONGINT;
  1854.         reserved2:                LONGINT;
  1855.         ioCompletion:            DirIOCompletionUPP;
  1856.         ioResult:                OSErr;
  1857.         saveA5:                    LONGINT;
  1858.         reqCode:                INTEGER;
  1859.         reserved:                ARRAY [0..1] OF LONGINT;
  1860.         serverHint:                AddrBlock;
  1861.         dsRefNum:                INTEGER;
  1862.         callID:                    LONGINT;
  1863.         identity:                AuthIdentity;
  1864.         gReserved1:                LONGINT;
  1865.         gReserved2:                LONGINT;
  1866.         gReserved3:                LONGINT;
  1867.         clientData:                LONGINT;
  1868.         aRecord:                RecordIDPtr;                            {  --> }
  1869.         attr:                    AttributePtr;                            {  --> AttributeCreationID returned here }
  1870.     END;
  1871.  
  1872. {
  1873. aRecord must contain valid PackedRLI and a CreationID.
  1874.  
  1875. Instead of passing type, length, and value in three separate
  1876. fields, we take a pointer to an Attribute structure that contains
  1877. all three, and has room for the AttributeCreationNumber.
  1878. The AttributeCreationID will be returned in the attr itself.
  1879.  
  1880. The AttributeTag tells the catalog service that the attribute is an RString,
  1881. binary, or a RecordID.
  1882. }
  1883. {
  1884. DeleteAttributeType:
  1885. This call is provided so that an existing AttributeType can be deleted.
  1886. If any attribute values exist for this type, they will all be deleted
  1887. (if the user has access rights to delete the values) and then the attribute type
  1888. will be deleted. Otherwise dsAccessDenied error will be returned.
  1889. }
  1890.     DirDeleteAttributeTypePB = RECORD
  1891.         qLink:                    Ptr;
  1892.         reserved1:                LONGINT;
  1893.         reserved2:                LONGINT;
  1894.         ioCompletion:            DirIOCompletionUPP;
  1895.         ioResult:                OSErr;
  1896.         saveA5:                    LONGINT;
  1897.         reqCode:                INTEGER;
  1898.         reserved:                ARRAY [0..1] OF LONGINT;
  1899.         serverHint:                AddrBlock;
  1900.         dsRefNum:                INTEGER;
  1901.         callID:                    LONGINT;
  1902.         identity:                AuthIdentity;
  1903.         gReserved1:                LONGINT;
  1904.         gReserved2:                LONGINT;
  1905.         gReserved3:                LONGINT;
  1906.         clientData:                LONGINT;
  1907.         aRecord:                RecordIDPtr;                            {  --> }
  1908.         attrType:                AttributeTypePtr;                        {  --> }
  1909.     END;
  1910.  
  1911. {
  1912.     DeleteAttributeValue
  1913. }
  1914.     DirDeleteAttributeValuePB = RECORD
  1915.         qLink:                    Ptr;
  1916.         reserved1:                LONGINT;
  1917.         reserved2:                LONGINT;
  1918.         ioCompletion:            DirIOCompletionUPP;
  1919.         ioResult:                OSErr;
  1920.         saveA5:                    LONGINT;
  1921.         reqCode:                INTEGER;
  1922.         reserved:                ARRAY [0..1] OF LONGINT;
  1923.         serverHint:                AddrBlock;
  1924.         dsRefNum:                INTEGER;
  1925.         callID:                    LONGINT;
  1926.         identity:                AuthIdentity;
  1927.         gReserved1:                LONGINT;
  1928.         gReserved2:                LONGINT;
  1929.         gReserved3:                LONGINT;
  1930.         clientData:                LONGINT;
  1931.         aRecord:                RecordIDPtr;                            {  -> }
  1932.         attr:                    AttributePtr;                            {  -> }
  1933.     END;
  1934.  
  1935. {
  1936.     ChangeAttributeValue:
  1937.     currentAttr ==> the attribute to be changed. For ADAS and PAB CreationID is
  1938.                     sufficient
  1939.     newAttr     ==> new value for the attribute. For ADAS and PAB 
  1940.                     CreationID field will be set when
  1941.                     the call succeesfully completes
  1942.     
  1943.     aRecord     ==> must contain valid PackedRecordLocationInfo and a CreationID.
  1944.  
  1945.  
  1946.     
  1947. }
  1948.     DirChangeAttributeValuePB = RECORD
  1949.         qLink:                    Ptr;
  1950.         reserved1:                LONGINT;
  1951.         reserved2:                LONGINT;
  1952.         ioCompletion:            DirIOCompletionUPP;
  1953.         ioResult:                OSErr;
  1954.         saveA5:                    LONGINT;
  1955.         reqCode:                INTEGER;
  1956.         reserved:                ARRAY [0..1] OF LONGINT;
  1957.         serverHint:                AddrBlock;
  1958.         dsRefNum:                INTEGER;
  1959.         callID:                    LONGINT;
  1960.         identity:                AuthIdentity;
  1961.         gReserved1:                LONGINT;
  1962.         gReserved2:                LONGINT;
  1963.         gReserved3:                LONGINT;
  1964.         clientData:                LONGINT;
  1965.         aRecord:                RecordIDPtr;                            {  -> }
  1966.         currentAttr:            AttributePtr;                            {  -> }
  1967.         newAttr:                AttributePtr;                            {  -> }
  1968.     END;
  1969.  
  1970. { VerifyAttributeValue }
  1971.     DirVerifyAttributeValuePB = RECORD
  1972.         qLink:                    Ptr;
  1973.         reserved1:                LONGINT;
  1974.         reserved2:                LONGINT;
  1975.         ioCompletion:            DirIOCompletionUPP;
  1976.         ioResult:                OSErr;
  1977.         saveA5:                    LONGINT;
  1978.         reqCode:                INTEGER;
  1979.         reserved:                ARRAY [0..1] OF LONGINT;
  1980.         serverHint:                AddrBlock;
  1981.         dsRefNum:                INTEGER;
  1982.         callID:                    LONGINT;
  1983.         identity:                AuthIdentity;
  1984.         gReserved1:                LONGINT;
  1985.         gReserved2:                LONGINT;
  1986.         gReserved3:                LONGINT;
  1987.         clientData:                LONGINT;
  1988.         aRecord:                RecordIDPtr;                            {  --> }
  1989.         attr:                    AttributePtr;                            {  --> }
  1990.     END;
  1991.  
  1992. {
  1993. aRecord must contain valid PackedRLI and a CreationID.
  1994.  
  1995. The attribute type and value are passed in the attribute structure.  If the
  1996. attribute CreationID is non-zero, the server will verify that an attribute with
  1997. the specified value and creation number exists in aRecord.  If the attribute
  1998. CreationID is zero, the server will verify the attribute by type and value
  1999. alone, and return the attribute CreationID in the Attribute struct if the
  2000. attribute exists.
  2001. }
  2002. {
  2003. EnumerateAttributeTypesGet:
  2004. The following two calls can be used to enumerate the attribute types present in
  2005. a specified RecordID.  The first, EnumerateAttributeTypesGet, processes the request
  2006. and reads the response into getBuffer, as much as will fit.  A kOCEMoreData error will
  2007. be returned if the buffer was not large enough.  After this call completes, the
  2008. client can call EnumerateAttributeTypesParse (see below).
  2009.  
  2010. The user will able to continue from a startingPoint by setting a startingAttrType.
  2011. Typically, this should be the last value returned in EnumerateAttributeTypesParse call
  2012. when 'kOCEMoreData' is returned.
  2013.  
  2014. If 'includeStartingPoint' is true when a 'startingAttrType' is specified, the starting value
  2015. will be included in the results, if it exists. If this is set to false, this value will not
  2016. be included. AttributeTypes following this type will be returned.
  2017. }
  2018.     DirEnumerateAttributeTypesGetPB = RECORD
  2019.         qLink:                    Ptr;
  2020.         reserved1:                LONGINT;
  2021.         reserved2:                LONGINT;
  2022.         ioCompletion:            DirIOCompletionUPP;
  2023.         ioResult:                OSErr;
  2024.         saveA5:                    LONGINT;
  2025.         reqCode:                INTEGER;
  2026.         reserved:                ARRAY [0..1] OF LONGINT;
  2027.         serverHint:                AddrBlock;
  2028.         dsRefNum:                INTEGER;
  2029.         callID:                    LONGINT;
  2030.         identity:                AuthIdentity;
  2031.         gReserved1:                LONGINT;
  2032.         gReserved2:                LONGINT;
  2033.         gReserved3:                LONGINT;
  2034.         clientData:                LONGINT;
  2035.         aRecord:                RecordIDPtr;                            {  --> }
  2036.         startingAttrType:        AttributeTypePtr;                        {  --> starting point }
  2037.         cReserved:                LONGINT;                                {  --  }
  2038.         dReserved:                LONGINT;                                {  --  }
  2039.         eReserved:                LONGINT;                                {  --  }
  2040.         fReserved:                LONGINT;                                {  --  }
  2041.         gReserved:                LONGINT;                                {  --  }
  2042.         hReserved:                LONGINT;                                {  --  }
  2043.         includeStartingPoint:    BOOLEAN;                                {  --> if true return the attrType specified by starting point }
  2044.         padByte:                SInt8; (* Byte *)
  2045.         i1Reserved:                INTEGER;                                {  --  }
  2046.         getBuffer:                Ptr;                                    {  --> }
  2047.         getBufferSize:            LONGINT;                                {  --> }
  2048.     END;
  2049.  
  2050. { The call-back function is defined as follows: }
  2051.     ForEachAttrTypeProcPtr = ProcPtr;  { FUNCTION ForEachAttrType(clientData: LONGINT; (CONST)VAR attrType: AttributeType): BOOLEAN; }
  2052.     ForEachAttrTypeUPP = UniversalProcPtr;
  2053.  
  2054.     ForEachAttrType = ForEachAttrTypeUPP;
  2055.  
  2056. {
  2057. EnumerateAttributeTypesParse:
  2058. After an EnumerateAttributeTypesGet call has completed, call EnumerateAttributeTypesParse
  2059. to parse through the buffer that was filled in EnumerateAttributeTypesGet.  The
  2060. toolbox will parse through the buffer and call the call-back routine for
  2061. each attribute type in the getBuffer.
  2062.  
  2063. The client should return false from eachAttrType to continue
  2064. processing of the EnumerateAttributeTypesParse request.  Returning true will
  2065. terminate the EnumerateAttributeTypesParse request.  The clientData parameter that
  2066. you pass in the parameter block will be passed to eachAttrType.
  2067. You are free to put anything in clientData - it is intended to allow
  2068. you some way to match the call-back to the original call (in case, for
  2069. example, you make simultaneous asynchronous calls).
  2070.  
  2071. For synchronous calls, the call-back routine actually runs as part of the same thread
  2072. of execution as the thread that made the EnumerateAttributeTypesParse call.  That means that the
  2073. same low-memory globals, A5, stack, etc. are in effect during the call-back
  2074. that were in effect when the call was made.  Because of this, the call-back
  2075. routine has the same restrictions as the caller of EnumerateAttributeTypesParse.
  2076. If EnumerateAttributeTypesParse was not called from interrupt level, then the call-
  2077. back routine can allocate memory. For asynchronous calls, call-back routine is
  2078. like a ioCompletion except that A5 will be preserved for the application.
  2079. }
  2080.     DirEnumerateAttributeTypesParsePB = RECORD
  2081.         qLink:                    Ptr;
  2082.         reserved1:                LONGINT;
  2083.         reserved2:                LONGINT;
  2084.         ioCompletion:            DirIOCompletionUPP;
  2085.         ioResult:                OSErr;
  2086.         saveA5:                    LONGINT;
  2087.         reqCode:                INTEGER;
  2088.         reserved:                ARRAY [0..1] OF LONGINT;
  2089.         serverHint:                AddrBlock;
  2090.         dsRefNum:                INTEGER;
  2091.         callID:                    LONGINT;
  2092.         identity:                AuthIdentity;
  2093.         gReserved1:                LONGINT;
  2094.         gReserved2:                LONGINT;
  2095.         gReserved3:                LONGINT;
  2096.         clientData:                LONGINT;
  2097.         aRecord:                RecordIDPtr;                            {  --> Same as DirEnumerateAttributeTypesGetPB }
  2098.         bReserved:                LONGINT;                                {  --  }
  2099.         cReserved:                LONGINT;                                {  --  }
  2100.         dReserved:                LONGINT;                                {  --  }
  2101.         eachAttrType:            ForEachAttrType;                        {  --> }
  2102.         fReserved:                LONGINT;                                {  --  }
  2103.         gReserved:                LONGINT;                                {  --  }
  2104.         hReserved:                LONGINT;                                {  --  }
  2105.         iReserved:                LONGINT;                                {  --  }
  2106.         getBuffer:                Ptr;                                    {  --> }
  2107.         getBufferSize:            LONGINT;                                {  --> }
  2108.     END;
  2109.  
  2110. {
  2111. DirAbort:
  2112. With this call a user will able to abort an outstanding catalog service call.
  2113. A user must pass a pointer to the parameter block for the outstanding call.
  2114. In the current version of the product, the toolbox will process this call
  2115. for NetSearchADAPDirectoriesGet or FindADAPDirectoryByNetSearch calls and if possible
  2116. it will abort. For other calls for ADAP and PAB this will return 'daAbortFailErr'.
  2117. For CSAM catalogs, this call will be passed to the corresponding CSAM driver.
  2118. The CSAM driver may process this call or may return 'daAbortFailErr'. This call can
  2119. be called only in synchronous mode. Since the abort call makes references to fields in
  2120. the pb associated with the original call, this pb must not be disposed or or altered if
  2121. the original call completes before the abort call has completed.
  2122. }
  2123.     DirAbortPB = RECORD
  2124.         qLink:                    Ptr;
  2125.         reserved1:                LONGINT;
  2126.         reserved2:                LONGINT;
  2127.         ioCompletion:            DirIOCompletionUPP;
  2128.         ioResult:                OSErr;
  2129.         saveA5:                    LONGINT;
  2130.         reqCode:                INTEGER;
  2131.         reserved:                ARRAY [0..1] OF LONGINT;
  2132.         serverHint:                AddrBlock;
  2133.         dsRefNum:                INTEGER;
  2134.         callID:                    LONGINT;
  2135.         identity:                AuthIdentity;
  2136.         gReserved1:                LONGINT;
  2137.         gReserved2:                LONGINT;
  2138.         gReserved3:                LONGINT;
  2139.         clientData:                LONGINT;
  2140.         pb:                        ^DirParamBlock;                            {  --> pb for the call which must be aborted }
  2141.     END;
  2142.  
  2143. {
  2144. AddPseudonym:
  2145. An alternate name and type can be added to a given record. If allowDuplicate
  2146. is set the name and type will be added even if the same name and type already
  2147. exists.
  2148. }
  2149.     DirAddPseudonymPB = RECORD
  2150.         qLink:                    Ptr;
  2151.         reserved1:                LONGINT;
  2152.         reserved2:                LONGINT;
  2153.         ioCompletion:            DirIOCompletionUPP;
  2154.         ioResult:                OSErr;
  2155.         saveA5:                    LONGINT;
  2156.         reqCode:                INTEGER;
  2157.         reserved:                ARRAY [0..1] OF LONGINT;
  2158.         serverHint:                AddrBlock;
  2159.         dsRefNum:                INTEGER;
  2160.         callID:                    LONGINT;
  2161.         identity:                AuthIdentity;
  2162.         gReserved1:                LONGINT;
  2163.         gReserved2:                LONGINT;
  2164.         gReserved3:                LONGINT;
  2165.         clientData:                LONGINT;
  2166.         aRecord:                RecordIDPtr;                            {  --> RecordID to which pseudonym is to be added }
  2167.         pseudonymName:            RStringPtr;                                {  --> new name to be added as pseudonym }
  2168.         pseudonymType:            RStringPtr;                                {  --> new name to be added as pseudonym }
  2169.         allowDuplicate:            BOOLEAN;                                {  --> }
  2170.         filler1:                BOOLEAN;
  2171.     END;
  2172.  
  2173. {
  2174. DeletePseudonym:
  2175. An alternate name and type for a given record can be deleted.
  2176. }
  2177.     DirDeletePseudonymPB = RECORD
  2178.         qLink:                    Ptr;
  2179.         reserved1:                LONGINT;
  2180.         reserved2:                LONGINT;
  2181.         ioCompletion:            DirIOCompletionUPP;
  2182.         ioResult:                OSErr;
  2183.         saveA5:                    LONGINT;
  2184.         reqCode:                INTEGER;
  2185.         reserved:                ARRAY [0..1] OF LONGINT;
  2186.         serverHint:                AddrBlock;
  2187.         dsRefNum:                INTEGER;
  2188.         callID:                    LONGINT;
  2189.         identity:                AuthIdentity;
  2190.         gReserved1:                LONGINT;
  2191.         gReserved2:                LONGINT;
  2192.         gReserved3:                LONGINT;
  2193.         clientData:                LONGINT;
  2194.         aRecord:                RecordIDPtr;                            {  --> RecordID to which pseudonym to be added }
  2195.         pseudonymName:            RStringPtr;                                {  --> pseudonymName to be deleted }
  2196.         pseudonymType:            RStringPtr;                                {  --> pseudonymType to be deleted }
  2197.     END;
  2198.  
  2199. {
  2200.     AddAlias:
  2201.     This call can be used to create an alias  record. The alias
  2202.     can be created either in the same or different cluster. ADAS will not support
  2203.     this call for this release. A new catalog capability flag 'kSupportsAlias' will indicate
  2204.     if the catalog supports this call. PAB's will support this call. For the PAB implementation,
  2205.     this call will create a record with the name and type specified an aRecord.
  2206.     This call works exactly like AddRecord.
  2207.     If 'allowDuplicate' is false and another record with same name and type already exists
  2208.     'daNoDupAllowed' error will be returned.
  2209. }
  2210.     DirAddAliasPB = RECORD
  2211.         qLink:                    Ptr;
  2212.         reserved1:                LONGINT;
  2213.         reserved2:                LONGINT;
  2214.         ioCompletion:            DirIOCompletionUPP;
  2215.         ioResult:                OSErr;
  2216.         saveA5:                    LONGINT;
  2217.         reqCode:                INTEGER;
  2218.         reserved:                ARRAY [0..1] OF LONGINT;
  2219.         serverHint:                AddrBlock;
  2220.         dsRefNum:                INTEGER;
  2221.         callID:                    LONGINT;
  2222.         identity:                AuthIdentity;
  2223.         gReserved1:                LONGINT;
  2224.         gReserved2:                LONGINT;
  2225.         gReserved3:                LONGINT;
  2226.         clientData:                LONGINT;
  2227.         aRecord:                RecordIDPtr;                            {  -> }
  2228.         allowDuplicate:            BOOLEAN;                                {  -> }
  2229.         filler1:                BOOLEAN;
  2230.     END;
  2231.  
  2232. {
  2233. DirFindValue:
  2234. This call can be used to find the occurrence of a value. The value
  2235. to be matched is passed in the buffer 'matchingData' field. The current
  2236. ADAP/PAB implementation will match a maximum of 32 bytes of data.
  2237. For attribute values in the PAB/ADAP implementation, only the first 32 bytes will
  2238. be used for comparing the occurrence of data. Search can be restricted to
  2239. a particular record and/or attribute type by specifying 'aRecord' or 'aType'.
  2240. After finding one occurrence, 'startingRecord' and 'startingAttribute'
  2241. can be specified to find the next occurrence of the same value.
  2242. 'sortDirection' can be specified with starting values to search forward or backward.
  2243. When a matching value is found, the 'recordFound' indicates the reccordID in which the
  2244. data occurrence was found, 'attributeFound' indicates the attribute with in which the
  2245. matching data was found. ADAP/PAB implementation returns only the type and creationID of
  2246. attributes. Catalogs which don't support creationIDs may return the
  2247. complete value; hence this call may need a buffer to hold the data. For ADAP/PAB implementations
  2248. the user has to make a DirLookup call to get the actual data. 'recordFound' and
  2249. 'attributeFound' can be used to initialize 'startingRecord' and 'startingAttribute' to
  2250. find the next occurrence of the value.
  2251. }
  2252.     DirFindValuePB = RECORD
  2253.         qLink:                    Ptr;
  2254.         reserved1:                LONGINT;
  2255.         reserved2:                LONGINT;
  2256.         ioCompletion:            DirIOCompletionUPP;
  2257.         ioResult:                OSErr;
  2258.         saveA5:                    LONGINT;
  2259.         reqCode:                INTEGER;
  2260.         reserved:                ARRAY [0..1] OF LONGINT;
  2261.         serverHint:                AddrBlock;
  2262.         dsRefNum:                INTEGER;
  2263.         callID:                    LONGINT;
  2264.         identity:                AuthIdentity;
  2265.         gReserved1:                LONGINT;
  2266.         gReserved2:                LONGINT;
  2267.         gReserved3:                LONGINT;
  2268.         clientData:                LONGINT;
  2269.         aRLI:                    PackedRLIPtr;                            {  --> an RLI specifying the cluster to be enumerated }
  2270.         aRecord:                LocalRecordIDPtr;                        {  --> if not nil, look only in this record }
  2271.         attrType:                AttributeTypePtr;                        {  --> if not nil, look only in this attribute type }
  2272.         startingRecord:            LocalRecordIDPtr;                        {  --> record in which to start searching }
  2273.         startingAttribute:        AttributePtr;                            {  --> attribute in which to start searching }
  2274.         recordFound:            LocalRecordIDPtr;                        { <--  record in which data was found }
  2275.         attributeFound:            Attribute;                                { <--  attribute in which data was found }
  2276.         matchSize:                LONGINT;                                {  --> length of matching bytes }
  2277.         matchingData:            Ptr;                                    {  --> data bytes to be matched in search }
  2278.         sortDirection:            DirSortDirection;                        {  --> sort direction (forwards or backwards) }
  2279.     END;
  2280.  
  2281. {
  2282. EnumeratePseudonymGet:
  2283. This call can be used to enumerate the existing pseudonyms for
  2284. a given record specified in 'aRecord'. A starting point can be specified
  2285. by 'startingName' and 'startingType'. If the 'includeStartingPoint' boolean
  2286. is true and a starting point is specified, the name specified by startingName
  2287. and startingType also is returned in the results, if it exists. If this is set to false,
  2288. the pseudonym in startingName and Type is not included.
  2289. Pseudonyms returned in the 'getBuffer' can be extracted by making an
  2290. EnumeratePseudonymParse call. The results will consist of a RecordID with the
  2291. name and type of the pseudonym. If the buffer could not hold all the results, then
  2292. 'kOCEMoreData' error will be returned. The user will be able to continue the call by
  2293. using the last result returned as starting point for the next call.
  2294. }
  2295.     DirEnumeratePseudonymGetPB = RECORD
  2296.         qLink:                    Ptr;
  2297.         reserved1:                LONGINT;
  2298.         reserved2:                LONGINT;
  2299.         ioCompletion:            DirIOCompletionUPP;
  2300.         ioResult:                OSErr;
  2301.         saveA5:                    LONGINT;
  2302.         reqCode:                INTEGER;
  2303.         reserved:                ARRAY [0..1] OF LONGINT;
  2304.         serverHint:                AddrBlock;
  2305.         dsRefNum:                INTEGER;
  2306.         callID:                    LONGINT;
  2307.         identity:                AuthIdentity;
  2308.         gReserved1:                LONGINT;
  2309.         gReserved2:                LONGINT;
  2310.         gReserved3:                LONGINT;
  2311.         clientData:                LONGINT;
  2312.         aRecord:                RecordIDPtr;                            {  --> }
  2313.         startingName:            RStringPtr;                                {  --> }
  2314.         startingType:            RStringPtr;                                {  --> }
  2315.         dReserved:                LONGINT;                                {  --  }
  2316.         eReserved:                LONGINT;                                {  --  }
  2317.         fReserved:                LONGINT;                                {  --  }
  2318.         gReserved:                LONGINT;                                {  --  }
  2319.         hReserved:                LONGINT;                                {  --  }
  2320.         includeStartingPoint:    BOOLEAN;                                {  --> if true return the Pseudonym specified by starting point will be included }
  2321.         padByte:                SInt8; (* Byte *)
  2322.         i1Reserved:                INTEGER;                                {  --  }
  2323.         getBuffer:                Ptr;                                    {  --> }
  2324.         getBufferSize:            LONGINT;                                {  --> }
  2325.     END;
  2326.  
  2327. { The call-back function is defined as follows: }
  2328.     ForEachRecordIDProcPtr = ProcPtr;  { FUNCTION ForEachRecordID(clientData: LONGINT; (CONST)VAR recordID: RecordID): BOOLEAN; }
  2329.     ForEachRecordIDUPP = UniversalProcPtr;
  2330.  
  2331.     ForEachRecordID = ForEachRecordIDUPP;
  2332.  
  2333. {
  2334. EnumeratePseudonymParse:
  2335. The pseudonyms returned in the 'getBuffer' from the EnumeratePseudonymGet call
  2336. can be extracted by using the EnumeratePseudonymParse call. 'eachRecordID'
  2337. will be called for each pseudonym.
  2338.  
  2339. Returning true from any call-back will terminate the EnumeratePseudonymParse call.
  2340.  
  2341. For synchronous calls, the call-back routine actually runs as part of the same thread
  2342. of execution as the thread that made the EnumeratePseudonymParse call.  That means that the
  2343. same low-memory globals, A5, stack, etc. are in effect during the call-back
  2344. that were in effect when the call was made.  Because of this, the call-back
  2345. routine has the same restrictions as the caller of EnumeratePseudonymParse:
  2346. if EnumeratePseudonymParse was not called from interrupt level, then the call-
  2347. back routine can allocate memory. For asynchronous calls, call-back routine is
  2348. like a ioCompletion except that A5 will be preserved for the application.
  2349. }
  2350.     DirEnumeratePseudonymParsePB = RECORD
  2351.         qLink:                    Ptr;
  2352.         reserved1:                LONGINT;
  2353.         reserved2:                LONGINT;
  2354.         ioCompletion:            DirIOCompletionUPP;
  2355.         ioResult:                OSErr;
  2356.         saveA5:                    LONGINT;
  2357.         reqCode:                INTEGER;
  2358.         reserved:                ARRAY [0..1] OF LONGINT;
  2359.         serverHint:                AddrBlock;
  2360.         dsRefNum:                INTEGER;
  2361.         callID:                    LONGINT;
  2362.         identity:                AuthIdentity;
  2363.         gReserved1:                LONGINT;
  2364.         gReserved2:                LONGINT;
  2365.         gReserved3:                LONGINT;
  2366.         clientData:                LONGINT;
  2367.         aRecord:                RecordIDPtr;                            {  --> same as DirEnumerateAliasesGetPB }
  2368.         bReserved:                LONGINT;                                {  --  }
  2369.         cReserved:                LONGINT;                                {  --  }
  2370.         eachRecordID:            ForEachRecordID;                        {  --> }
  2371.         eReserved:                LONGINT;                                {  --  }
  2372.         fReserved:                LONGINT;                                {  --  }
  2373.         gReserved:                LONGINT;                                {  --  }
  2374.         hReserved:                LONGINT;                                {  --  }
  2375.         iReserved:                LONGINT;                                {  --  }
  2376.         getBuffer:                Ptr;                                    {  --> }
  2377.         getBufferSize:            LONGINT;                                {  --> }
  2378.     END;
  2379.  
  2380. { GetNameAndType }
  2381.     DirGetNameAndTypePB = RECORD
  2382.         qLink:                    Ptr;
  2383.         reserved1:                LONGINT;
  2384.         reserved2:                LONGINT;
  2385.         ioCompletion:            DirIOCompletionUPP;
  2386.         ioResult:                OSErr;
  2387.         saveA5:                    LONGINT;
  2388.         reqCode:                INTEGER;
  2389.         reserved:                ARRAY [0..1] OF LONGINT;
  2390.         serverHint:                AddrBlock;
  2391.         dsRefNum:                INTEGER;
  2392.         callID:                    LONGINT;
  2393.         identity:                AuthIdentity;
  2394.         gReserved1:                LONGINT;
  2395.         gReserved2:                LONGINT;
  2396.         gReserved3:                LONGINT;
  2397.         clientData:                LONGINT;
  2398.         aRecord:                RecordIDPtr;                            {  --> }
  2399.     END;
  2400.  
  2401. {
  2402. aRecord must contain valid RLI and a CreationID.  It
  2403. must also contain pointers to maximum-length RStrings (name and type fields)
  2404. in which will be returned the record's distinguished name and type.
  2405. }
  2406. {
  2407. SetNameAndType:
  2408. This call can be used to change a name and type for a record. The record
  2409. to be renamed is specified using 'aRecord'.
  2410. 'newName' and 'newType' indicate the name and type to be set.
  2411. 'allowDuplicate' if true indicates that name is to be set even if another
  2412. name and type exactly matches the newName and newType specified.
  2413.  
  2414. 'newName' and 'newType' are required since the catalogs not supporting
  2415. CreationID require name and type fields in the recordID to identify a given
  2416. record.
  2417. }
  2418.     DirSetNameAndTypePB = RECORD
  2419.         qLink:                    Ptr;
  2420.         reserved1:                LONGINT;
  2421.         reserved2:                LONGINT;
  2422.         ioCompletion:            DirIOCompletionUPP;
  2423.         ioResult:                OSErr;
  2424.         saveA5:                    LONGINT;
  2425.         reqCode:                INTEGER;
  2426.         reserved:                ARRAY [0..1] OF LONGINT;
  2427.         serverHint:                AddrBlock;
  2428.         dsRefNum:                INTEGER;
  2429.         callID:                    LONGINT;
  2430.         identity:                AuthIdentity;
  2431.         gReserved1:                LONGINT;
  2432.         gReserved2:                LONGINT;
  2433.         gReserved3:                LONGINT;
  2434.         clientData:                LONGINT;
  2435.         aRecord:                RecordIDPtr;                            {  --> }
  2436.         allowDuplicate:            BOOLEAN;                                {  --> }
  2437.         padByte:                SInt8; (* Byte *)
  2438.         newName:                RStringPtr;                                {  --> new name for the record }
  2439.         newType:                RStringPtr;                                {  --> new type for the record }
  2440.     END;
  2441.  
  2442. {
  2443. DirGetMetaRecordInfo: This call can be made to obtain
  2444. the MetaRecordInfo for a given record. Information returned
  2445. is 16 bytes of OPAQUE information about the record.
  2446. }
  2447.     DirGetRecordMetaInfoPB = RECORD
  2448.         qLink:                    Ptr;
  2449.         reserved1:                LONGINT;
  2450.         reserved2:                LONGINT;
  2451.         ioCompletion:            DirIOCompletionUPP;
  2452.         ioResult:                OSErr;
  2453.         saveA5:                    LONGINT;
  2454.         reqCode:                INTEGER;
  2455.         reserved:                ARRAY [0..1] OF LONGINT;
  2456.         serverHint:                AddrBlock;
  2457.         dsRefNum:                INTEGER;
  2458.         callID:                    LONGINT;
  2459.         identity:                AuthIdentity;
  2460.         gReserved1:                LONGINT;
  2461.         gReserved2:                LONGINT;
  2462.         gReserved3:                LONGINT;
  2463.         clientData:                LONGINT;
  2464.         aRecord:                RecordIDPtr;                            {  --> }
  2465.         metaInfo:                DirMetaInfo;                            { <--  }
  2466.     END;
  2467.  
  2468. {
  2469. DirGetDNodeMetaInfo: This call can be made to obtain
  2470. the DNodeMetaInfo for a given Packed RLI. Information returned
  2471. is 16 bytes of OPAQUE information about the DNode.
  2472. }
  2473.     DirGetDNodeMetaInfoPB = RECORD
  2474.         qLink:                    Ptr;
  2475.         reserved1:                LONGINT;
  2476.         reserved2:                LONGINT;
  2477.         ioCompletion:            DirIOCompletionUPP;
  2478.         ioResult:                OSErr;
  2479.         saveA5:                    LONGINT;
  2480.         reqCode:                INTEGER;
  2481.         reserved:                ARRAY [0..1] OF LONGINT;
  2482.         serverHint:                AddrBlock;
  2483.         dsRefNum:                INTEGER;
  2484.         callID:                    LONGINT;
  2485.         identity:                AuthIdentity;
  2486.         gReserved1:                LONGINT;
  2487.         gReserved2:                LONGINT;
  2488.         gReserved3:                LONGINT;
  2489.         clientData:                LONGINT;
  2490.         pRLI:                    PackedRLIPtr;                            {  --> }
  2491.         metaInfo:                DirMetaInfo;                            { <--  }
  2492.     END;
  2493.  
  2494. {
  2495. EnumerateDirectoriesGet:
  2496. A user can enumerate all the catalogs installed. This includes installed
  2497. ADAP and CSAM catalogs. The user can specify a signature as input to restrict
  2498. the results. kDirADAPKind will return only ADAP catalogs, kDirDSAMKind
  2499. will return all CSAM catalogs. kDirAllKinds will get both ADAP & CSAM catalogs.
  2500. A specific signature (e.g. X.500) may be used to get catalogs with an X.500 signature.
  2501. The information for each catalog returned will have directoryName, discriminator and features.
  2502.  
  2503. If the user receives 'noErr' or 'kOCEMoreData', the buffer will contain valid results. A user
  2504. can extract the results in the 'getBuffer' by making an DirEnumerateDirectories call.
  2505.  
  2506. If 'kOCEMoreData' is received, the user can continue enumeration by using the last catalog and
  2507. discriminator as startingDirectoryName and staringDirDiscriminator in the next call.
  2508.  
  2509. If 'includeStartingPoint' is true and a starting point is specified,
  2510. the staring point will be returned in the result. If false, it is not included.
  2511. }
  2512.     DirEnumerateDirectoriesGetPB = RECORD
  2513.         qLink:                    Ptr;
  2514.         reserved1:                LONGINT;
  2515.         reserved2:                LONGINT;
  2516.         ioCompletion:            DirIOCompletionUPP;
  2517.         ioResult:                OSErr;
  2518.         saveA5:                    LONGINT;
  2519.         reqCode:                INTEGER;
  2520.         reserved:                ARRAY [0..1] OF LONGINT;
  2521.         serverHint:                AddrBlock;
  2522.         dsRefNum:                INTEGER;
  2523.         callID:                    LONGINT;
  2524.         identity:                AuthIdentity;
  2525.         gReserved1:                LONGINT;
  2526.         gReserved2:                LONGINT;
  2527.         gReserved3:                LONGINT;
  2528.         clientData:                LONGINT;
  2529.         directoryKind:            OCEDirectoryKind;                        {  --> enumerate catalogs bearing this signature }
  2530.         startingDirectoryName:    DirectoryNamePtr;                        {  --> staring catalog name }
  2531.         startingDirDiscriminator: DirDiscriminator;                        {  --> staring catalog discriminator }
  2532.         eReserved:                LONGINT;                                {  --  }
  2533.         fReserved:                LONGINT;                                {  --  }
  2534.         gReserved:                LONGINT;                                {  --  }
  2535.         hReserved:                LONGINT;                                {  --  }
  2536.         includeStartingPoint:    BOOLEAN;                                {  --> if true return the catalog specified by starting point }
  2537.         padByte:                SInt8; (* Byte *)
  2538.         i1Reserved:                INTEGER;                                {  --  }
  2539.         getBuffer:                Ptr;                                    {  --> }
  2540.         getBufferSize:            LONGINT;                                {  --> }
  2541.     END;
  2542.  
  2543.     ForEachDirectoryProcPtr = ProcPtr;  { FUNCTION ForEachDirectory(clientData: LONGINT; (CONST)VAR dirName: DirectoryName; (CONST)VAR discriminator: DirDiscriminator; features: DirGestalt): BOOLEAN; }
  2544.     ForEachDirectoryUPP = UniversalProcPtr;
  2545.  
  2546.     ForEachDirectory = ForEachDirectoryUPP;
  2547.  
  2548. {
  2549. EnumerateDirectoriesParse:
  2550. The catalog info returned in 'getBuffer' from the EnumerateDirectoriesGet call
  2551. can be extracted using the EnumerateDirectoriesParse call. 'eachDirectory' will
  2552. be called for each catalog.
  2553.  
  2554. Returning true from any call-back will terminate the EnumerateDirectoriesParse call.
  2555.  
  2556. For synchronous calls, the call-back routine actually runs as part of the same thread
  2557. of execution as the thread that made the EnumerateDirectoriesParse call.  That means that the
  2558. same low-memory globals, A5, stack, etc. are in effect during the call-back
  2559. that were in effect when the call was made.  Because of this, the call-back
  2560. routine has the same restrictions as the caller of EnumerateDirectoriesParse:
  2561. if EnumerateDirectoriesParse was not called from interrupt level, then the call-
  2562. back routine can allocate memory. For asynchronous calls, call-back routine is
  2563. like a ioCompletion except that A5 will be preserved for the application.
  2564.  
  2565. eachDirectory will be called each time to return to the client a
  2566. DirectoryName, DirDiscriminator, and features for that catalog.
  2567. }
  2568.     DirEnumerateDirectoriesParsePB = RECORD
  2569.         qLink:                    Ptr;
  2570.         reserved1:                LONGINT;
  2571.         reserved2:                LONGINT;
  2572.         ioCompletion:            DirIOCompletionUPP;
  2573.         ioResult:                OSErr;
  2574.         saveA5:                    LONGINT;
  2575.         reqCode:                INTEGER;
  2576.         reserved:                ARRAY [0..1] OF LONGINT;
  2577.         serverHint:                AddrBlock;
  2578.         dsRefNum:                INTEGER;
  2579.         callID:                    LONGINT;
  2580.         identity:                AuthIdentity;
  2581.         gReserved1:                LONGINT;
  2582.         gReserved2:                LONGINT;
  2583.         gReserved3:                LONGINT;
  2584.         clientData:                LONGINT;
  2585.         aReserved:                LONGINT;                                {  --  }
  2586.         bReserved:                LONGINT;                                {  --  }
  2587.         cReserved:                LONGINT;                                {  --  }
  2588.         dReserved:                LONGINT;                                {  --  }
  2589.         eachDirectory:            ForEachDirectory;                        {  --> }
  2590.         fReserved:                LONGINT;                                {  --  }
  2591.         gReserved:                LONGINT;                                {  --  }
  2592.         hReserved:                LONGINT;                                {  --  }
  2593.         iReserved:                LONGINT;                                {  --  }
  2594.         getBuffer:                Ptr;                                    {  --> }
  2595.         getBufferSize:            LONGINT;                                {  --> }
  2596.     END;
  2597.  
  2598. {
  2599. The Following five call are specific to ADAP Catalogs. Toolbox
  2600. remembers a list of catalogs across boots. If any catalog service
  2601. call is intended for a ADAP catalog, then it must be in the list.
  2602. In order for managing this list, A client (Probably DE will use these
  2603. calls.
  2604. DirAddADAPDirectoryPB: Add a new ADAP catalog to the list.
  2605. DirRemoveADAPDirectory: Remove a ADAP catalog from the list.
  2606. DirNetSearchADAPDirectoriesGet:   search an internet for adas catalogs.
  2607. DirNetSearchADAPDirectoriesParse: extract the results obtained NetSearchADAPDirectoriesGet.
  2608. DirFindADAPDirectoryByNetSearch: Find a specified catalog through net search.
  2609. }
  2610. {
  2611. NetSearchADAPDirectoriesGet:
  2612. This call can be used to make a network wide search for finding ADAP catalogs.
  2613. This call will be supported only by 'ADAP' and involve highly expensive
  2614. network operations, so the user is advised to use utmost discretion before
  2615. making this call. The results will be collected in the 'getbuffer' and can be
  2616. extracted using NetSearchADAPDirectoriesParse call. The directoryName,
  2617. the directoryDiscriminator, features and serverHint (AppleTalk address for
  2618. a PathFinder serving that catalog) are collected for each catalog found
  2619. on the network. If buffer is too small to hold all the catalogs found on
  2620. the network, a 'kOCEMoreData' error will be returned.
  2621. }
  2622.     DirNetSearchADAPDirectoriesGetPB = RECORD
  2623.         qLink:                    Ptr;
  2624.         reserved1:                LONGINT;
  2625.         reserved2:                LONGINT;
  2626.         ioCompletion:            DirIOCompletionUPP;
  2627.         ioResult:                OSErr;
  2628.         saveA5:                    LONGINT;
  2629.         reqCode:                INTEGER;
  2630.         reserved:                ARRAY [0..1] OF LONGINT;
  2631.         serverHint:                AddrBlock;
  2632.         dsRefNum:                INTEGER;
  2633.         callID:                    LONGINT;
  2634.         identity:                AuthIdentity;
  2635.         gReserved1:                LONGINT;
  2636.         gReserved2:                LONGINT;
  2637.         gReserved3:                LONGINT;
  2638.         clientData:                LONGINT;
  2639.         getBuffer:                Ptr;                                    {  --> }
  2640.         getBufferSize:            LONGINT;                                {  --> }
  2641.         cReserved:                LONGINT;                                {  --  }
  2642.     END;
  2643.  
  2644.     ForEachADAPDirectoryProcPtr = ProcPtr;  { FUNCTION ForEachADAPDirectory(clientData: LONGINT; (CONST)VAR dirName: DirectoryName; (CONST)VAR discriminator: DirDiscriminator; features: DirGestalt; serverHint: AddrBlock): BOOLEAN; }
  2645.     ForEachADAPDirectoryUPP = UniversalProcPtr;
  2646.  
  2647.     ForEachADAPDirectory = ForEachADAPDirectoryUPP;
  2648.  
  2649. {
  2650. DirNetSearchADAPDirectoriesParse:
  2651. This call can be used to extract the results obtained in the 'getBuffer'.
  2652. The directoryName, directoryDiscriminator, features and
  2653. serverHint (AppleTalk address for a PathFinder serving that catalog) are
  2654. returned in each call-back. These values may be used to make an
  2655. AddADAPDirectory call.
  2656.  
  2657. Returning TRUE from any call-back will terminate the NetSearchADAPDirectoriesParse request.
  2658.  
  2659. For synchronous calls, the call-back routine actually runs as part of the same thread
  2660. of execution as the thread that made the DirNetSearchADAPDirectoriesParse call. That means that the
  2661. same low-memory globals, A5, stack, etc. are in effect during the call-back
  2662. that were in effect when the call was made.  Because of this, the call-back
  2663. routine has the same restrictions as the caller of DirNetSearchADAPDirectoriesParse:
  2664. if DirNetSearchADAPDirectoriesParse was not called from interrupt level, then the call-
  2665. back routine can allocate memory. For asynchronous calls, call-back routine is
  2666. like a ioCompletion except that A5 will be preserved for the application.
  2667. }
  2668.     DirNetSearchADAPDirectoriesParsePB = RECORD
  2669.         qLink:                    Ptr;
  2670.         reserved1:                LONGINT;
  2671.         reserved2:                LONGINT;
  2672.         ioCompletion:            DirIOCompletionUPP;
  2673.         ioResult:                OSErr;
  2674.         saveA5:                    LONGINT;
  2675.         reqCode:                INTEGER;
  2676.         reserved:                ARRAY [0..1] OF LONGINT;
  2677.         serverHint:                AddrBlock;
  2678.         dsRefNum:                INTEGER;
  2679.         callID:                    LONGINT;
  2680.         identity:                AuthIdentity;
  2681.         gReserved1:                LONGINT;
  2682.         gReserved2:                LONGINT;
  2683.         gReserved3:                LONGINT;
  2684.         clientData:                LONGINT;
  2685.         getBuffer:                Ptr;                                    {  --> }
  2686.         getBufferSize:            LONGINT;                                {  --> }
  2687.         eachADAPDirectory:        ForEachADAPDirectory;                    {  --> }
  2688.     END;
  2689.  
  2690. {
  2691. DirFindADAPDirectoryByNetSearch:
  2692. This call can be used to make a network wide search to find an ADAP catalog.
  2693. This call will be supported only by 'ADAP' and involves highly expensive
  2694. network operations, so the user is advised to use utmost discretion before
  2695. making this call. The catalog is specified using directoryName and discriminator.
  2696. If 'addToOCESetup' is true, the catalog will be automatically added to the setup
  2697. list and will be visible through the EnumerateDirectories call and also
  2698. also a creationID to the directoryRecord will be returned.
  2699. If this parameter is set to 'false', the catalog will be added to temporary list
  2700. and will be available for making other catalog service calls. The catalogs
  2701. which are not in the preference catalog list will not be visible through the
  2702. EnumerateDirectories call.
  2703. }
  2704.     DirFindADAPDirectoryByNetSearchPB = RECORD
  2705.         qLink:                    Ptr;
  2706.         reserved1:                LONGINT;
  2707.         reserved2:                LONGINT;
  2708.         ioCompletion:            DirIOCompletionUPP;
  2709.         ioResult:                OSErr;
  2710.         saveA5:                    LONGINT;
  2711.         reqCode:                INTEGER;
  2712.         reserved:                ARRAY [0..1] OF LONGINT;
  2713.         serverHint:                AddrBlock;
  2714.         dsRefNum:                INTEGER;
  2715.         callID:                    LONGINT;
  2716.         identity:                AuthIdentity;
  2717.         gReserved1:                LONGINT;
  2718.         gReserved2:                LONGINT;
  2719.         gReserved3:                LONGINT;
  2720.         clientData:                LONGINT;
  2721.         directoryName:            DirectoryNamePtr;                        {  --> catalog name }
  2722.         discriminator:            DirDiscriminator;                        {  --> discriminate between dup catalog names }
  2723.         addToOCESetup:            BOOLEAN;                                {  --> add this catalog to OCE Setup List }
  2724.         padByte:                SInt8; (* Byte *)
  2725.         directoryRecordCID:        CreationID;                                { <--  creationID for the catalog record }
  2726.     END;
  2727.  
  2728. {
  2729. DirAddADAPDirectory:
  2730. The catalog specified by 'directoryName' and 'discriminator' will be
  2731. added to the list of catalogs maintained by the Toolbox. Once added,
  2732. the catalog is available across boots, until the catalog is removed
  2733. explicitly through a DirRemoveADAPDirectory call.
  2734. If 'serverHint' is not nil, the address provided will be used
  2735. to contact a PathFinder for the catalog specified.
  2736. If 'serverHint' is nil or does not point to a valid PathFinder server
  2737. for that catalog, this call will fail.
  2738. If 'addToOCESetup' is true, the catalog will be automatically added to the setup
  2739. catalog list and will be visible through EnumerateDirectories calls and
  2740. also a creationID to the directoryRecord will be returned.
  2741. If this parameter is set to 'false', catalog will be added to temprary list
  2742. and will be available for making other catalog service calls. The catalogs
  2743. which are not in the setup  list will not be visible through
  2744. EnumerateDirectories call.
  2745. }
  2746.     DirAddADAPDirectoryPB = RECORD
  2747.         qLink:                    Ptr;
  2748.         reserved1:                LONGINT;
  2749.         reserved2:                LONGINT;
  2750.         ioCompletion:            DirIOCompletionUPP;
  2751.         ioResult:                OSErr;
  2752.         saveA5:                    LONGINT;
  2753.         reqCode:                INTEGER;
  2754.         reserved:                ARRAY [0..1] OF LONGINT;
  2755.         serverHint:                AddrBlock;
  2756.         dsRefNum:                INTEGER;
  2757.         callID:                    LONGINT;
  2758.         identity:                AuthIdentity;
  2759.         gReserved1:                LONGINT;
  2760.         gReserved2:                LONGINT;
  2761.         gReserved3:                LONGINT;
  2762.         clientData:                LONGINT;
  2763.         directoryName:            DirectoryNamePtr;                        {  --> catalog name }
  2764.         discriminator:            DirDiscriminator;                        {  --> discriminate between dup catalog names }
  2765.         addToOCESetup:            BOOLEAN;                                {  --> add this catalog to OCE Setup }
  2766.         padByte:                SInt8; (* Byte *)
  2767.         directoryRecordCID:        CreationID;                                { <--  creationID for the catalog record }
  2768.     END;
  2769.  
  2770. {
  2771. GetDirectoryInfo:
  2772. DirGetDirectoryInfo will do:
  2773.  
  2774. If a 'dsRefNum' is non-Zero, the catalog information for
  2775.     the corresponding  PAB will be  returned.
  2776.  If 'dsRefNum' is zero and 'serverHint' is non-zero, If the
  2777.  'serverHint' points to a valid ADAP Catalog Server(Path Finder),
  2778.  the catalog information (i.e. directoryName, discriminator, features)
  2779.  for that catalog will be returned.
  2780.     If a  valid catalog name and discriminator are provided
  2781.     features (Set of capability flags) for that catalog will be returned.
  2782. }
  2783.     DirGetDirectoryInfoPB = RECORD
  2784.         qLink:                    Ptr;
  2785.         reserved1:                LONGINT;
  2786.         reserved2:                LONGINT;
  2787.         ioCompletion:            DirIOCompletionUPP;
  2788.         ioResult:                OSErr;
  2789.         saveA5:                    LONGINT;
  2790.         reqCode:                INTEGER;
  2791.         reserved:                ARRAY [0..1] OF LONGINT;
  2792.         serverHint:                AddrBlock;
  2793.         dsRefNum:                INTEGER;
  2794.         callID:                    LONGINT;
  2795.         identity:                AuthIdentity;
  2796.         gReserved1:                LONGINT;
  2797.         gReserved2:                LONGINT;
  2798.         gReserved3:                LONGINT;
  2799.         clientData:                LONGINT;
  2800.         directoryName:            DirectoryNamePtr;                        {  --> catalog name }
  2801.         discriminator:            DirDiscriminator;                        { <--> descriminate between dup catalog names }
  2802.         features:                DirGestalt;                                { <--  capability bit flags }
  2803.     END;
  2804.  
  2805. {
  2806.  * Note on Access Controls:
  2807.  * Access control is based on a list model.
  2808.  * You can get access controls list which gives dsObject and accMask for each dsObject.
  2809.  * GetAccessControl can be limited to currently supplied identity by setting forCurrentUserOnly.
  2810.  * There are special DSObjects are defined in ADASTypes.h for each of the category
  2811.  * supported in ADAS Catalogs. (kOwner, kFriends, kAuthenticatedToCluster, 
  2812.  * kAuthenticatedToDirectory, kGuest) and DUGetActlDSSpec call can be used
  2813.  * to obtain appropraiate DSSpec before making set calls to ADAS catalogs.
  2814.  *
  2815.  }
  2816. {
  2817.     GetDNodeAccessControlGet:
  2818.     This call can be done to get back access control list for a DNode.
  2819.     pRLI -> RLI of the DNode whose access control list is sought
  2820.     curUserAccMask -> If this is 'true', Access controls for the user specified by
  2821.                       the identity parameter will be returned other wise entire list
  2822.                       will be returned.
  2823.     startingDsObj  -> If this is not nil, list should be started after this object.
  2824.     startingPointInclusive -> If staringDsObj is specified, include that in the returned
  2825.                               results.
  2826.                               
  2827.     The results will be collected in the 'getBuffer' supplied by the user.
  2828.     If buffer can not hold all the data returned 'daMoreData' error will be returned.
  2829.      
  2830.     If user receives 'noErr' or 'daMoreData', buffer will contain valid results. A user
  2831.     can extract the results in the 'getBuffer' by making 'DsGetDNodeAccessControlParse' call.
  2832.     
  2833.     Results returned for each DSObject will contain DSSpecPtr and three sets of access mask. 
  2834.  
  2835. }
  2836.     DirGetDNodeAccessControlGetPB = RECORD
  2837.         qLink:                    Ptr;
  2838.         reserved1:                LONGINT;
  2839.         reserved2:                LONGINT;
  2840.         ioCompletion:            DirIOCompletionUPP;
  2841.         ioResult:                OSErr;
  2842.         saveA5:                    LONGINT;
  2843.         reqCode:                INTEGER;
  2844.         reserved:                ARRAY [0..1] OF LONGINT;
  2845.         serverHint:                AddrBlock;
  2846.         dsRefNum:                INTEGER;
  2847.         callID:                    LONGINT;
  2848.         identity:                AuthIdentity;
  2849.         gReserved1:                LONGINT;
  2850.         gReserved2:                LONGINT;
  2851.         gReserved3:                LONGINT;
  2852.         clientData:                LONGINT;
  2853.         pRLI:                    PackedRLIPtr;                            {  -> RLI of the cluster whose access control list is sought  }
  2854.         bReserved:                LONGINT;                                {  -- unused }
  2855.         cReserved:                LONGINT;                                {  -- unused }
  2856.         dReserved:                LONGINT;                                {  -- unused }
  2857.         eResreved:                LONGINT;                                { --> }
  2858.         forCurrentUserOnly:        BOOLEAN;                                { -->  }
  2859.         filler1:                BOOLEAN;
  2860.         startingPoint:            ^DSSpec;                                { --> starting Point }
  2861.         includeStartingPoint:    BOOLEAN;                                {  -> if true return the DsObject 
  2862.                                                                 specified in starting point }
  2863.         filler2:                BOOLEAN;
  2864.         getBuffer:                Ptr;                                    {    -> }
  2865.         getBufferSize:            LONGINT;                                {  -> }
  2866.     END;
  2867.  
  2868. { The Access Control call-back function is defined as follows: }
  2869.     ForEachDNodeAccessControlProcPtr = ProcPtr;  { FUNCTION ForEachDNodeAccessControl(clientData: LONGINT; (CONST)VAR dsObj: DSSpec; activeDnodeAccMask: AccessMask; defaultRecordAccMask: AccessMask; defaultAttributeAccMask: AccessMask): BOOLEAN; }
  2870.     ForEachDNodeAccessControlUPP = UniversalProcPtr;
  2871.  
  2872.     ForEachDNodeAccessControl = ForEachDNodeAccessControlUPP;
  2873.  
  2874. {
  2875.     GetDNodeAccessControlParse:
  2876.     After an GetDNodeAccessControlGet call has completed, 
  2877.     call GetDNodeAccessControlParse to parse through the buffer that
  2878.     that was filled in GetDNodeAccessControlGet.
  2879.     
  2880.     'eachObject' will be called each time to return to the client a
  2881.     DsObject and a set of three accMasks (three long words) for that object.
  2882.     Acceesmasks returned apply to the dsObject in the callback :
  2883.     1. Currently Active Access mask for the specified DNode.
  2884.     2. Default Access mask for any Record in the DNode
  2885.     3. Default Access mask for any Attribute in the DNode
  2886.     The clientData parameter that you pass in the parameter block will be passed
  2887.     to 'eachObject'.  You are free to put anything in clientData - it is intended
  2888.     to allow you some way to match the call-back to the original call (for
  2889.     example, you make more then one aysynchronous GetDNodeAccessControlGet calls and you want to
  2890.     associate returned results in some way).
  2891.     
  2892.     The client should return FALSE from 'eachObject' to continue
  2893.     processing of the GetDNodeAccessControlParse request.  Returning TRUE will
  2894.     terminate the GetDNodeAccessControlParse request.
  2895.  
  2896.     For synchronous calls, the call-back routine actually runs as part of the same thread 
  2897.     of execution as the thread that made the GetDNodeAccessControlParse call.  That means that the
  2898.     same low-memory globals, A5, stack, etc. are in effect during the call-back
  2899.     that were in effect when the call was made.  Because of this, the call-back
  2900.     routine has the same restrictions as the caller of GetDNodeAccessControlParse:
  2901.     if GetDNodeAccessControlParse was not called from interrupt level, then the call-
  2902.     back routine can allocate memory. For asynchronous calls, call-back routine is
  2903.     like a ioCompletion except that A5 will be preserved for the application.
  2904.  
  2905.  
  2906. }
  2907.     DirGetDNodeAccessControlParsePB = RECORD
  2908.         qLink:                    Ptr;
  2909.         reserved1:                LONGINT;
  2910.         reserved2:                LONGINT;
  2911.         ioCompletion:            DirIOCompletionUPP;
  2912.         ioResult:                OSErr;
  2913.         saveA5:                    LONGINT;
  2914.         reqCode:                INTEGER;
  2915.         reserved:                ARRAY [0..1] OF LONGINT;
  2916.         serverHint:                AddrBlock;
  2917.         dsRefNum:                INTEGER;
  2918.         callID:                    LONGINT;
  2919.         identity:                AuthIdentity;
  2920.         gReserved1:                LONGINT;
  2921.         gReserved2:                LONGINT;
  2922.         gReserved3:                LONGINT;
  2923.         clientData:                LONGINT;
  2924.         pRLI:                    PackedRLIPtr;                            {  -> RLI of the cluster  }
  2925.         bReserved:                LONGINT;                                {  -- unused }
  2926.         cReserved:                LONGINT;                                {  -- unused }
  2927.         dReserved:                LONGINT;                                {  -- unused }
  2928.         eachObject:                ForEachDNodeAccessControl;                { --> }
  2929.         forCurrentUserOnly:        BOOLEAN;                                { -->  }
  2930.         filler1:                BOOLEAN;
  2931.         startingPoint:            ^DSSpec;                                { --> starting Point }
  2932.         includeStartingPoint:    BOOLEAN;                                {  -> if true return the record 
  2933.                                                         specified in starting point }
  2934.         filler2:                BOOLEAN;
  2935.         getBuffer:                Ptr;                                    {    -> }
  2936.         getBufferSize:            LONGINT;                                {  -> }
  2937.     END;
  2938.  
  2939. {
  2940.     GetRecordAccessControlGet:
  2941.     This call can be done to get back access control list for a RecordID.
  2942.     aRecord -> RecordID to which access control list is sought
  2943.     curUserAccMask -> If this is 'true', Access controls for the user specified by
  2944.                       the identity parameter will be returned other wise entire list
  2945.                       will be returned.
  2946.     startingDsObj  -> If this is not nil, list should be started after this object.
  2947.     startingPointInclusive -> If staringDsObj is specified, include that in the returned
  2948.                               results.
  2949.                               
  2950.     The results will be collected in the 'getBuffer' supplied by the user.
  2951.     If buffer can not hold all the data returned 'daMoreData' error will be returned.
  2952.      
  2953.     If user receives 'noErr' or 'daMoreData', buffer will contain valid results. A user
  2954.     can extract the results in the 'getBuffer' by making 'DsGetDNodeAccessControlParse' call.
  2955.     
  2956.     Results returned for each DSObject will contain DSSpecPtr and accMask. 
  2957.  
  2958. }
  2959.     DirGetRecordAccessControlGetPB = RECORD
  2960.         qLink:                    Ptr;
  2961.         reserved1:                LONGINT;
  2962.         reserved2:                LONGINT;
  2963.         ioCompletion:            DirIOCompletionUPP;
  2964.         ioResult:                OSErr;
  2965.         saveA5:                    LONGINT;
  2966.         reqCode:                INTEGER;
  2967.         reserved:                ARRAY [0..1] OF LONGINT;
  2968.         serverHint:                AddrBlock;
  2969.         dsRefNum:                INTEGER;
  2970.         callID:                    LONGINT;
  2971.         identity:                AuthIdentity;
  2972.         gReserved1:                LONGINT;
  2973.         gReserved2:                LONGINT;
  2974.         gReserved3:                LONGINT;
  2975.         clientData:                LONGINT;
  2976.         aRecord:                RecordIDPtr;                            {  -> RecordID to which access control list is sought list is sought  }
  2977.         bReserved:                LONGINT;                                {  -- unused }
  2978.         cReserved:                LONGINT;                                {  -- unused }
  2979.         dReserved:                LONGINT;                                {  -- unused }
  2980.         eResreved:                LONGINT;                                { --> }
  2981.         forCurrentUserOnly:        BOOLEAN;                                { -->  }
  2982.         filler1:                BOOLEAN;
  2983.         startingPoint:            ^DSSpec;                                { --> starting Point }
  2984.         includeStartingPoint:    BOOLEAN;                                {  -> if true return the DsObject 
  2985.                                                                 specified in starting point }
  2986.         filler2:                BOOLEAN;
  2987.         getBuffer:                Ptr;                                    {    -> }
  2988.         getBufferSize:            LONGINT;                                {  -> }
  2989.     END;
  2990.  
  2991. { The Access Control call-back function is defined as follows: }
  2992.     ForEachRecordAccessControlProcPtr = ProcPtr;  { FUNCTION ForEachRecordAccessControl(clientData: LONGINT; (CONST)VAR dsObj: DSSpec; activeDnodeAccMask: AccessMask; activeRecordAccMask: AccessMask; defaultAttributeAccMask: AccessMask): BOOLEAN; }
  2993.     ForEachRecordAccessControlUPP = UniversalProcPtr;
  2994.  
  2995.     ForEachRecordAccessControl = ForEachRecordAccessControlUPP;
  2996.  
  2997. {
  2998.     GetRecordAccessControlParse:
  2999.     After an GetRecordAccessControlGet call has completed, 
  3000.     call GetRecordAccessControlParse to parse through the buffer that
  3001.     that was filled in GetRecordAccessControlGet.
  3002.     
  3003.     'eachObject' will be called each time to return to the client a
  3004.     DsObject and a set of three accMasks (three long words) for that object.
  3005.     Acceesmasks returned apply to the dsObject in the callback :
  3006.     1. Active Access mask for the DNode Containing the Record.
  3007.     2. Active Access mask for the Record specified.
  3008.     3. Defualt Access mask for Attributes in the record.
  3009.     The clientData parameter that you pass in the parameter block will be passed
  3010.     to 'eachObject'.  You are free to put anything in clientData - it is intended
  3011.     to allow you some way to match the call-back to the original call (for
  3012.     example, you make more then one aysynchronous GetRecordAccessControlGet calls and you want to
  3013.     associate returned results in some way).
  3014.     
  3015.     The client should return FALSE from 'eachObject' to continue
  3016.     processing of the GetRecordAccessControlParse request.  Returning TRUE will
  3017.     terminate the GetRecordAccessControlParse request.
  3018.  
  3019.     For synchronous calls, the call-back routine actually runs as part of the same thread 
  3020.     of execution as the thread that made the GetRecordAccessControlParse call.  That means that the
  3021.     same low-memory globals, A5, stack, etc. are in effect during the call-back
  3022.     that were in effect when the call was made.  Because of this, the call-back
  3023.     routine has the same restrictions as the caller of GetRecordAccessControlParse:
  3024.     if GetRecordAccessControlParse was not called from interrupt level, then the call-
  3025.     back routine can allocate memory. For asynchronous calls, call-back routine is
  3026.     like a ioCompletion except that A5 will be preserved for the application.
  3027.  
  3028.  
  3029. }
  3030.     DirGetRecordAccessControlParsePB = RECORD
  3031.         qLink:                    Ptr;
  3032.         reserved1:                LONGINT;
  3033.         reserved2:                LONGINT;
  3034.         ioCompletion:            DirIOCompletionUPP;
  3035.         ioResult:                OSErr;
  3036.         saveA5:                    LONGINT;
  3037.         reqCode:                INTEGER;
  3038.         reserved:                ARRAY [0..1] OF LONGINT;
  3039.         serverHint:                AddrBlock;
  3040.         dsRefNum:                INTEGER;
  3041.         callID:                    LONGINT;
  3042.         identity:                AuthIdentity;
  3043.         gReserved1:                LONGINT;
  3044.         gReserved2:                LONGINT;
  3045.         gReserved3:                LONGINT;
  3046.         clientData:                LONGINT;
  3047.         aRecord:                RecordIDPtr;                            {  -> RecordID to which access control list is sought list is sought  }
  3048.         bReserved:                LONGINT;                                {  -- unused }
  3049.         cReserved:                LONGINT;                                {  -- unused }
  3050.         dReserved:                LONGINT;                                {  -- unused }
  3051.         eachObject:                ForEachRecordAccessControl;                { --> }
  3052.         forCurrentUserOnly:        BOOLEAN;                                { -->  }
  3053.         filler1:                BOOLEAN;
  3054.         startingPoint:            ^DSSpec;                                { --> starting Point }
  3055.         includeStartingPoint:    BOOLEAN;                                {  -> if true return the record 
  3056.                                                         specified in starting point }
  3057.         filler2:                BOOLEAN;
  3058.         getBuffer:                Ptr;                                    {    -> }
  3059.         getBufferSize:            LONGINT;                                {  -> }
  3060.     END;
  3061.  
  3062. {
  3063.     GetAttributeAccessControlGet:
  3064.     This call can be done to get back access control list for a attributeType with in a RecordID.
  3065.     aRecord -> RecordID to which access control list is sought
  3066.     aType    -> Attribute Type to which access controls are sought
  3067.     curUserAccMask -> If this is 'true', Access controls for the user specified by
  3068.                       the identity parameter will be returned other wise entire list
  3069.                       will be returned.
  3070.     startingDsObj  -> If this is not nil, list should be started after this object.
  3071.     startingPointInclusive -> If staringDsObj is specified, include that in the returned
  3072.                               results.
  3073.                               
  3074.     The results will be collected in the 'getBuffer' supplied by the user.
  3075.     If buffer can not hold all the data returned 'daMoreData' error will be returned.
  3076.      
  3077.     If user receives 'noErr' or 'daMoreData', buffer will contain valid results. A user
  3078.     can extract the results in the 'getBuffer' by making 'DsGetDNodeAccessControlParse' call.
  3079.     
  3080.     Results returned for each DSObject will contain DSSpecPtr and accMask. 
  3081.  
  3082. }
  3083.     DirGetAttributeAccessControlGetPB = RECORD
  3084.         qLink:                    Ptr;
  3085.         reserved1:                LONGINT;
  3086.         reserved2:                LONGINT;
  3087.         ioCompletion:            DirIOCompletionUPP;
  3088.         ioResult:                OSErr;
  3089.         saveA5:                    LONGINT;
  3090.         reqCode:                INTEGER;
  3091.         reserved:                ARRAY [0..1] OF LONGINT;
  3092.         serverHint:                AddrBlock;
  3093.         dsRefNum:                INTEGER;
  3094.         callID:                    LONGINT;
  3095.         identity:                AuthIdentity;
  3096.         gReserved1:                LONGINT;
  3097.         gReserved2:                LONGINT;
  3098.         gReserved3:                LONGINT;
  3099.         clientData:                LONGINT;
  3100.         aRecord:                RecordIDPtr;                            {  -> RecordID to which access control list is sought list is sought  }
  3101.         aType:                    AttributeTypePtr;                        {  -> Attribute Type to which access controls are sought          }
  3102.         cReserved:                LONGINT;                                {  -- unused }
  3103.         dReserved:                LONGINT;                                {  -- unused }
  3104.         eResreved:                LONGINT;                                { --> }
  3105.         forCurrentUserOnly:        BOOLEAN;                                { -->  }
  3106.         filler1:                BOOLEAN;
  3107.         startingPoint:            ^DSSpec;                                { --> starting Point }
  3108.         includeStartingPoint:    BOOLEAN;                                {  -> if true return the DsObject 
  3109.                                                                 specified in starting point }
  3110.         filler2:                BOOLEAN;
  3111.         getBuffer:                Ptr;                                    {    -> }
  3112.         getBufferSize:            LONGINT;                                {  -> }
  3113.     END;
  3114.  
  3115. { The Access Control call-back function is defined as follows: }
  3116.     ForEachAttributeAccessControlProcPtr = ProcPtr;  { FUNCTION ForEachAttributeAccessControl(clientData: LONGINT; (CONST)VAR dsObj: DSSpec; activeDnodeAccMask: AccessMask; activeRecordAccMask: AccessMask; activeAttributeAccMask: AccessMask): BOOLEAN; }
  3117.     ForEachAttributeAccessControlUPP = UniversalProcPtr;
  3118.  
  3119.     ForEachAttributeAccessControl = ForEachAttributeAccessControlUPP;
  3120.  
  3121. {
  3122.     GetAttributeAccessControlParse:
  3123.     After an GetAttributeAccessControlGet call has completed, 
  3124.     call GetAttributeAccessControlParse to parse through the buffer that
  3125.     that was filled in GetAttributeAccessControlGet.
  3126.     
  3127.     'eachObject' will be called each time to return to the client a
  3128.     DsObject and a set of three accMasks (three long words) for that object.
  3129.     Acceesmasks returned apply to the dsObject in the callback :
  3130.     1. Active Access mask for the DNode Containing the Attribute.
  3131.     2. Active Access mask for the Record in the Containing the Attribute.
  3132.     3. Active Access mask for the specified Attribute.
  3133.     The clientData parameter that you pass in the parameter block will be passed
  3134.     to 'eachObject'.  You are free to put anything in clientData - it is intended
  3135.     to allow you some way to match the call-back to the original call (for
  3136.     example, you make more then one aysynchronous GetAttributeAccessControlGet calls and you want to
  3137.     associate returned results in some way).
  3138.     
  3139.     The client should return FALSE from 'eachObject' to continue
  3140.     processing of the GetAttributeAccessControlParse request.  Returning TRUE will
  3141.     terminate the GetAttributeAccessControlParse request.
  3142.  
  3143.     For synchronous calls, the call-back routine actually runs as part of the same thread 
  3144.     of execution as the thread that made the GetAttributeAccessControlParse call.  That means that the
  3145.     same low-memory globals, A5, stack, etc. are in effect during the call-back
  3146.     that were in effect when the call was made.  Because of this, the call-back
  3147.     routine has the same restrictions as the caller of GetAttributeAccessControlParse:
  3148.     if GetAttributeAccessControlParse was not called from interrupt level, then the call-
  3149.     back routine can allocate memory. For asynchronous calls, call-back routine is
  3150.     like a ioCompletion except that A5 will be preserved for the application.
  3151.  
  3152.  
  3153. }
  3154.     DirGetAttributeAccessControlParsePB = RECORD
  3155.         qLink:                    Ptr;
  3156.         reserved1:                LONGINT;
  3157.         reserved2:                LONGINT;
  3158.         ioCompletion:            DirIOCompletionUPP;
  3159.         ioResult:                OSErr;
  3160.         saveA5:                    LONGINT;
  3161.         reqCode:                INTEGER;
  3162.         reserved:                ARRAY [0..1] OF LONGINT;
  3163.         serverHint:                AddrBlock;
  3164.         dsRefNum:                INTEGER;
  3165.         callID:                    LONGINT;
  3166.         identity:                AuthIdentity;
  3167.         gReserved1:                LONGINT;
  3168.         gReserved2:                LONGINT;
  3169.         gReserved3:                LONGINT;
  3170.         clientData:                LONGINT;
  3171.         aRecord:                RecordIDPtr;                            {  -> RecordID to which access control list is sought list is sought  }
  3172.         aType:                    AttributeTypePtr;                        {  -> Attribute Type to which access controls are sought          }
  3173.         cReserved:                LONGINT;                                {  -- unused }
  3174.         dReserved:                LONGINT;                                {  -- unused }
  3175.         eachObject:                ForEachAttributeAccessControl;            { --> }
  3176.         forCurrentUserOnly:        BOOLEAN;                                { -->  }
  3177.         filler1:                BOOLEAN;
  3178.         startingPoint:            ^DSSpec;                                { --> starting Point }
  3179.         includeStartingPoint:    BOOLEAN;                                {  -> if true return the record 
  3180.                                                         specified in starting point }
  3181.         filler2:                BOOLEAN;
  3182.         getBuffer:                Ptr;                                    {    -> }
  3183.         getBufferSize:            LONGINT;                                {  -> }
  3184.     END;
  3185.  
  3186. {
  3187. MapPathNameToDNodeNumber:
  3188. This call maps a given PathName within a catalog to its DNodeNumber.
  3189. }
  3190.     DirMapPathNameToDNodeNumberPB = RECORD
  3191.         qLink:                    Ptr;
  3192.         reserved1:                LONGINT;
  3193.         reserved2:                LONGINT;
  3194.         ioCompletion:            DirIOCompletionUPP;
  3195.         ioResult:                OSErr;
  3196.         saveA5:                    LONGINT;
  3197.         reqCode:                INTEGER;
  3198.         reserved:                ARRAY [0..1] OF LONGINT;
  3199.         serverHint:                AddrBlock;
  3200.         dsRefNum:                INTEGER;
  3201.         callID:                    LONGINT;
  3202.         identity:                AuthIdentity;
  3203.         gReserved1:                LONGINT;
  3204.         gReserved2:                LONGINT;
  3205.         gReserved3:                LONGINT;
  3206.         clientData:                LONGINT;
  3207.         directoryName:            DirectoryNamePtr;                        {  --> catalog name }
  3208.         discriminator:            DirDiscriminator;                        {  --> discriminator }
  3209.         dNodeNumber:            DNodeNum;                                { <--  dNodenumber to the path }
  3210.         path:                    PackedPathNamePtr;                        {  --> Path Name to be mapped }
  3211.     END;
  3212.  
  3213. {
  3214. PathName in the path field will be mapped to the cooresponding dNodeNumber and
  3215. returned in the DNodeNumber field. directoryName and descriminator Fields are
  3216. ignored. DSRefNum is used to identify the catalog.
  3217. }
  3218. {
  3219. MapDNodeNumberToPathName:
  3220. This call will map a given DNodeNumber with in a catalog to the
  3221. corresponding PathName.
  3222. }
  3223.     DirMapDNodeNumberToPathNamePB = RECORD
  3224.         qLink:                    Ptr;
  3225.         reserved1:                LONGINT;
  3226.         reserved2:                LONGINT;
  3227.         ioCompletion:            DirIOCompletionUPP;
  3228.         ioResult:                OSErr;
  3229.         saveA5:                    LONGINT;
  3230.         reqCode:                INTEGER;
  3231.         reserved:                ARRAY [0..1] OF LONGINT;
  3232.         serverHint:                AddrBlock;
  3233.         dsRefNum:                INTEGER;
  3234.         callID:                    LONGINT;
  3235.         identity:                AuthIdentity;
  3236.         gReserved1:                LONGINT;
  3237.         gReserved2:                LONGINT;
  3238.         gReserved3:                LONGINT;
  3239.         clientData:                LONGINT;
  3240.         directoryName:            DirectoryNamePtr;                        {  --> catalog name }
  3241.         discriminator:            DirDiscriminator;                        {  --> discriminator }
  3242.         dNodeNumber:            DNodeNum;                                {  --> dNodenumber to be mapped }
  3243.         path:                    PackedPathNamePtr;                        { <--  Packed Path Name returned }
  3244.         lengthOfPathName:        INTEGER;                                {  --> length of packed pathName structure}
  3245.     END;
  3246.  
  3247. {
  3248. dNodeNumber in the DNodeNumber field will be mapped to the cooresponding
  3249. pathName and returned in the PackedPathName field.
  3250. lengthOfPathName is to be set the length of pathName structure.
  3251. If length of PackedPathName is larger then the lengthOfPathName, kOCEMoreData
  3252. OSErr will be returned.
  3253. }
  3254. {
  3255. GetLocalNetworkSpec:
  3256. This call will return the Local NetworkSpec. Client should supply
  3257. an RString big enough to hold the NetworkSpec.
  3258. }
  3259.     DirGetLocalNetworkSpecPB = RECORD
  3260.         qLink:                    Ptr;
  3261.         reserved1:                LONGINT;
  3262.         reserved2:                LONGINT;
  3263.         ioCompletion:            DirIOCompletionUPP;
  3264.         ioResult:                OSErr;
  3265.         saveA5:                    LONGINT;
  3266.         reqCode:                INTEGER;
  3267.         reserved:                ARRAY [0..1] OF LONGINT;
  3268.         serverHint:                AddrBlock;
  3269.         dsRefNum:                INTEGER;
  3270.         callID:                    LONGINT;
  3271.         identity:                AuthIdentity;
  3272.         gReserved1:                LONGINT;
  3273.         gReserved2:                LONGINT;
  3274.         gReserved3:                LONGINT;
  3275.         clientData:                LONGINT;
  3276.         directoryName:            DirectoryNamePtr;                        {  --> catalog name }
  3277.         discriminator:            DirDiscriminator;                        {  --> discriminator }
  3278.         networkSpec:            NetworkSpecPtr;                            { <--  NetworkSpec }
  3279.     END;
  3280.  
  3281. {
  3282. PathName in the path field must be set to nil. internetName should be large
  3283. enough to hold the internetName. InterNetname returned indicates path finder's
  3284. local internet (configured by administrator).
  3285. }
  3286. {
  3287. GetDNodeInfo:
  3288. This call will return the information (internetName and descriptor)
  3289. for the given RLI of a DNode.
  3290. }
  3291.     DirGetDNodeInfoPB = RECORD
  3292.         qLink:                    Ptr;
  3293.         reserved1:                LONGINT;
  3294.         reserved2:                LONGINT;
  3295.         ioCompletion:            DirIOCompletionUPP;
  3296.         ioResult:                OSErr;
  3297.         saveA5:                    LONGINT;
  3298.         reqCode:                INTEGER;
  3299.         reserved:                ARRAY [0..1] OF LONGINT;
  3300.         serverHint:                AddrBlock;
  3301.         dsRefNum:                INTEGER;
  3302.         callID:                    LONGINT;
  3303.         identity:                AuthIdentity;
  3304.         gReserved1:                LONGINT;
  3305.         gReserved2:                LONGINT;
  3306.         gReserved3:                LONGINT;
  3307.         clientData:                LONGINT;
  3308.         pRLI:                    PackedRLIPtr;                            {  --> packed RLI whose info is requested }
  3309.         descriptor:                DirNodeKind;                            { <--  dNode descriptor }
  3310.         networkSpec:            NetworkSpecPtr;                            { <--  cluster's networkSpec if kIsCluster }
  3311.     END;
  3312.  
  3313. {
  3314. If DnodeNumber is set to a non zero value, path should be set to nil.
  3315. if DnodeNumber is set to zero, pathName should point to a packed path name.
  3316. internetName should be large enough to hold
  3317. the internetName. (If the internetName is same as the one got by
  3318. GetLocalInternetName call, it indicates cluster is reachable  without
  3319. forwarders, --> Tell me if I am wrong)
  3320. }
  3321. {
  3322. DirCreatePersonalDirectory:
  3323. A new  personal catalog can be created by specifying an FSSpec for
  3324. the file. If a file already exists dupFNErr will be returned. This call is
  3325. supported 'synchronous' mode only.
  3326. }
  3327.     DirCreatePersonalDirectoryPB = RECORD
  3328.         qLink:                    Ptr;
  3329.         reserved1:                LONGINT;
  3330.         reserved2:                LONGINT;
  3331.         ioCompletion:            DirIOCompletionUPP;
  3332.         ioResult:                OSErr;
  3333.         saveA5:                    LONGINT;
  3334.         reqCode:                INTEGER;
  3335.         reserved:                ARRAY [0..1] OF LONGINT;
  3336.         serverHint:                AddrBlock;
  3337.         dsRefNum:                INTEGER;
  3338.         callID:                    LONGINT;
  3339.         identity:                AuthIdentity;
  3340.         gReserved1:                LONGINT;
  3341.         gReserved2:                LONGINT;
  3342.         gReserved3:                LONGINT;
  3343.         clientData:                LONGINT;
  3344.         fsSpec:                    FSSpecPtr;                                {  --> FSSpec for the Personal Catalog }
  3345.         fdType:                    OSType;                                    {  --> file type for the Personal Catalog }
  3346.         fdCreator:                OSType;                                    {  --> file creator for the Personal Catalog }
  3347.     END;
  3348.  
  3349. {
  3350. DirOpenPersonalDirectory:
  3351. An existing personal catalog can be opened using this call.
  3352. User can specify the personal catalog by FSSpec for the AddressBook file.
  3353. 'accessRequested' field specifies open permissions. 'fsRdPerm'  & 'fsRdWrPerm'
  3354. are the only accepted open modes for the address book.
  3355. When the call completes successfully, a dsRefNum will be returned. The 'dsRefNum'
  3356. field is in the DSParamBlockHeader. In addittion 'accessGranted' indicates
  3357. actual permission with personal catalog is opened and 'features' indicate the capabilty flags
  3358. associated with the personal catalog.
  3359. This call is supported 'synchronous' mode only.
  3360. }
  3361.     DirOpenPersonalDirectoryPB = RECORD
  3362.         qLink:                    Ptr;
  3363.         reserved1:                LONGINT;
  3364.         reserved2:                LONGINT;
  3365.         ioCompletion:            DirIOCompletionUPP;
  3366.         ioResult:                OSErr;
  3367.         saveA5:                    LONGINT;
  3368.         reqCode:                INTEGER;
  3369.         reserved:                ARRAY [0..1] OF LONGINT;
  3370.         serverHint:                AddrBlock;
  3371.         dsRefNum:                INTEGER;
  3372.         callID:                    LONGINT;
  3373.         identity:                AuthIdentity;
  3374.         gReserved1:                LONGINT;
  3375.         gReserved2:                LONGINT;
  3376.         gReserved3:                LONGINT;
  3377.         clientData:                LONGINT;
  3378.         fsSpec:                    FSSpecPtr;                                {  --> Open an existing Personal Catalog }
  3379.         accessRequested:        CHAR;                                    {  --> Open: permissions Requested(byte)}
  3380.         accessGranted:            CHAR;                                    {  <-- Open: permissions (byte) (Granted)}
  3381.         features:                DirGestalt;                                { <--  features for Personal Catalog }
  3382.     END;
  3383.  
  3384. {
  3385. DirClosePersonalDirectory: This call lets a client close AddressBook opened by DirOpenPersonalDirectory.
  3386. The Personal Catalog specified by the 'dsRefNum' will be closed.
  3387. This call is supported 'synchronous' mode only.
  3388. }
  3389.     DirClosePersonalDirectoryPB = RECORD
  3390.         qLink:                    Ptr;
  3391.         reserved1:                LONGINT;
  3392.         reserved2:                LONGINT;
  3393.         ioCompletion:            DirIOCompletionUPP;
  3394.         ioResult:                OSErr;
  3395.         saveA5:                    LONGINT;
  3396.         reqCode:                INTEGER;
  3397.         reserved:                ARRAY [0..1] OF LONGINT;
  3398.         serverHint:                AddrBlock;
  3399.         dsRefNum:                INTEGER;
  3400.         callID:                    LONGINT;
  3401.         identity:                AuthIdentity;
  3402.         gReserved1:                LONGINT;
  3403.         gReserved2:                LONGINT;
  3404.         gReserved3:                LONGINT;
  3405.         clientData:                LONGINT;
  3406.     END;
  3407.  
  3408. {
  3409. DirMakePersonalDirectoryRLI: With this call a client can make an RLI
  3410. for a Personal Catalog opened by DirOpenPersonalDirectory Call.
  3411. A packed RLI is created for the Personal Catalog specified by the 'dsRefNum'.
  3412. If a client has a need to make the AddressBook reference to persistent
  3413. acrross boots it should make use of this call. In the current implementaion
  3414. PackedRLI has an embeeded System7.0 'alias'. If in later time
  3415. If client has a need to make reference to the AddressBook, it must use
  3416. ADAPLibrary call 'DUExtractAlias' and resole the 'alias' to 'FSSpec' and
  3417. make DirOpenPersonalDirectory call to get a 'dsRefNum'.
  3418.   'fromFSSpec'            FSPecPtr from which relative alias to be created. If nil,
  3419.                         absolute alias is created.
  3420.  'pRLIBufferSize' indicates the size of buffer pointed by 'pRLI'
  3421.  'pRLISize'    indicates the actual length of 'pRLI'. If the call
  3422.                         fails with 'kOCEMoreData' error a client can reissue
  3423.                     this call with a larger buffer of this length.
  3424.   'pRLI' is pointer to the buffer in which 'PackedRLI' is
  3425.   returned.
  3426. This call is supported in 'synchronous' mode only.
  3427. }
  3428.     DirMakePersonalDirectoryRLIPB = RECORD
  3429.         qLink:                    Ptr;
  3430.         reserved1:                LONGINT;
  3431.         reserved2:                LONGINT;
  3432.         ioCompletion:            DirIOCompletionUPP;
  3433.         ioResult:                OSErr;
  3434.         saveA5:                    LONGINT;
  3435.         reqCode:                INTEGER;
  3436.         reserved:                ARRAY [0..1] OF LONGINT;
  3437.         serverHint:                AddrBlock;
  3438.         dsRefNum:                INTEGER;
  3439.         callID:                    LONGINT;
  3440.         identity:                AuthIdentity;
  3441.         gReserved1:                LONGINT;
  3442.         gReserved2:                LONGINT;
  3443.         gReserved3:                LONGINT;
  3444.         clientData:                LONGINT;
  3445.         fromFSSpec:                FSSpecPtr;                                {  --> FSSpec for creating relative alia }
  3446.         pRLIBufferSize:            INTEGER;                                {  --> Length of 'pRLI' buffer }
  3447.         pRLISize:                INTEGER;                                { <--  Length of actual 'pRLI' }
  3448.         pRLI:                    PackedRLIPtr;                            { <--  pRLI for the specified AddressBook }
  3449.     END;
  3450.  
  3451. {****************************************************************************
  3452. The calls described below apply only for CSAM Drivers:
  3453.  
  3454. The following three calls provide capability to Install/Remove a CSAM at RunTime.
  3455.     DirAddDSAM
  3456.     DirRemoveDSAM
  3457.     DirInstantiateDSAM
  3458.  
  3459. The following two calls provide capability to Install/Remove a CSAM Catalog at RunTime.
  3460.     DirAddDSAMDirectory
  3461.     DirRemoveDirectory
  3462.  
  3463. DirGetDirectoryIcon call is used by clients to get any special icon associated
  3464. with a CSAM catalog.
  3465.  
  3466. ****************************************************************************}
  3467. {
  3468. DirAddDSAM: This call can be used to inorm the availability of a CSAM file
  3469. after discovering the CSAM file.
  3470.     dsamName -> is generic CSAM name e.g. Untitled X.500 directory
  3471.     dsamSignature -> could be generic CSAM kind e.g. 'X500'.
  3472.     fsSpec -> is the FileSpec for the file containing CSAM resources.
  3473. If the call is successfull 'DSAMRecordCID' will be returned. If the
  3474. call returns 'daDSAMRecordCIDExists', record was already there and
  3475. 'dsamRecordCID' will be returned.
  3476. This call can be done only in synchronous mode.
  3477. }
  3478.     DirAddDSAMPB = RECORD
  3479.         qLink:                    Ptr;
  3480.         reserved1:                LONGINT;
  3481.         reserved2:                LONGINT;
  3482.         ioCompletion:            DirIOCompletionUPP;
  3483.         ioResult:                OSErr;
  3484.         saveA5:                    LONGINT;
  3485.         reqCode:                INTEGER;
  3486.         reserved:                ARRAY [0..1] OF LONGINT;
  3487.         serverHint:                AddrBlock;
  3488.         dsRefNum:                INTEGER;
  3489.         callID:                    LONGINT;
  3490.         identity:                AuthIdentity;
  3491.         gReserved1:                LONGINT;
  3492.         gReserved2:                LONGINT;
  3493.         gReserved3:                LONGINT;
  3494.         clientData:                LONGINT;
  3495.         dsamRecordCID:            CreationID;                                { <--  CreationID for the CSAM record }
  3496.         dsamName:                RStringPtr;                                {  --> CSAM name }
  3497.         dsamKind:                OCEDirectoryKind;                        {  --> CSAM kind }
  3498.         fsSpec:                    FSSpecPtr;                                {  --> FSSpec for the file containing CSAM }
  3499.     END;
  3500.  
  3501. {
  3502. DirInstantiateDSAM: This call should be used by the CSAM driver in response
  3503. Driver Open call to indicate the toolbox about the availability of the CSAM.
  3504.     dsamName -> is generic CSAM name e.g. Untitled X.500 directory
  3505.     dsamKind -> could be generic CSAM kind e.g. 'X500'.
  3506.     dsamData -> pointer to private DSAMData. This will be paased back to the CSAM
  3507.     when the CSAM functions (DSAMDirProc,DSAMDirParseProc, DSAMAuthProc) are called.
  3508.     CSAM should already be setup using DirAddDSAM call.
  3509.     DSAMDirProc -> This procedure will be called when  any catalog service
  3510.     call intended for the CSAM (other then parse calls)
  3511.     DSAMDirParseProc -> This procedure will be called when any of the parse calls
  3512.     are called.
  3513.     DSAMAuthProc -> This procedure will be called when any of the Authentication Calls
  3514.     are made to the CSAM. If the CSAM does not support authentication, this can be nil.
  3515. This call can be done only in synchronous mode.
  3516. }
  3517.     DSAMDirProcPtr = ProcPtr;  { FUNCTION DSAMDir(dsamData: Ptr; paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr; }
  3518.     DSAMDirUPP = UniversalProcPtr;
  3519.  
  3520.     DSAMDirProc = DSAMDirUPP;
  3521.  
  3522.     DSAMDirParseProcPtr = ProcPtr;  { FUNCTION DSAMDirParse(dsamData: Ptr; paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr; }
  3523.     DSAMDirParseUPP = UniversalProcPtr;
  3524.  
  3525.     DSAMDirParseProc = DSAMDirParseUPP;
  3526.  
  3527.     DSAMAuthProcPtr = ProcPtr;  { FUNCTION DSAMAuth(dsamData: Ptr; pb: AuthParamBlockPtr; async: BOOLEAN): OSErr; }
  3528.     DSAMAuthUPP = UniversalProcPtr;
  3529.  
  3530.     DSAMAuthProc = DSAMAuthUPP;
  3531.  
  3532.     DirInstantiateDSAMPB = RECORD
  3533.         qLink:                    Ptr;
  3534.         reserved1:                LONGINT;
  3535.         reserved2:                LONGINT;
  3536.         ioCompletion:            DirIOCompletionUPP;
  3537.         ioResult:                OSErr;
  3538.         saveA5:                    LONGINT;
  3539.         reqCode:                INTEGER;
  3540.         reserved:                ARRAY [0..1] OF LONGINT;
  3541.         serverHint:                AddrBlock;
  3542.         dsRefNum:                INTEGER;
  3543.         callID:                    LONGINT;
  3544.         identity:                AuthIdentity;
  3545.         gReserved1:                LONGINT;
  3546.         gReserved2:                LONGINT;
  3547.         gReserved3:                LONGINT;
  3548.         clientData:                LONGINT;
  3549.         dsamName:                RStringPtr;                                {  --> dsamName name }
  3550.         dsamKind:                OCEDirectoryKind;                        {  --> DSAMKind }
  3551.         dsamData:                Ptr;                                    {  --> dsamData  }
  3552.         dsamDirProc:            DSAMDirUPP;                                {  --> of type DSAMDirProc: for catalog service calls }
  3553.         dsamDirParseProc:        DSAMDirParseUPP;                        {  --> of type DSAMDirParseProc: for catalog service parse calls }
  3554.         dsamAuthProc:            DSAMAuthUPP;                            {  --> of type DSAMAuthProc: for authetication service calls }
  3555.     END;
  3556.  
  3557. {
  3558. DirRemoveDSAM: This call can be used to remove  a CSAM file from the OCE Setup.
  3559.     dsamRecordCID -> is the creationID of the CSAM record.
  3560. This call can be made only in synchronous mode.
  3561. }
  3562.     DirRemoveDSAMPB = RECORD
  3563.         qLink:                    Ptr;
  3564.         reserved1:                LONGINT;
  3565.         reserved2:                LONGINT;
  3566.         ioCompletion:            DirIOCompletionUPP;
  3567.         ioResult:                OSErr;
  3568.         saveA5:                    LONGINT;
  3569.         reqCode:                INTEGER;
  3570.         reserved:                ARRAY [0..1] OF LONGINT;
  3571.         serverHint:                AddrBlock;
  3572.         dsRefNum:                INTEGER;
  3573.         callID:                    LONGINT;
  3574.         identity:                AuthIdentity;
  3575.         gReserved1:                LONGINT;
  3576.         gReserved2:                LONGINT;
  3577.         gReserved3:                LONGINT;
  3578.         clientData:                LONGINT;
  3579.         dsamRecordCID:            CreationID;                                { <--  CreationID for the CSAM record }
  3580.     END;
  3581.  
  3582. {
  3583. DirAddDSAMDirectory: This call can be used to inorm the availability of a CSAM catalog.
  3584.     dsamRecordCID ->  recordID for the CSAM serving this catalog
  3585.     directoryName ->  name of the catalog
  3586.     discriminator -> discriminator for the catalog
  3587.     directoryRecordCID -> If the call is successful, creationID for the record will
  3588.                             be returned.
  3589. }
  3590.     DirAddDSAMDirectoryPB = RECORD
  3591.         qLink:                    Ptr;
  3592.         reserved1:                LONGINT;
  3593.         reserved2:                LONGINT;
  3594.         ioCompletion:            DirIOCompletionUPP;
  3595.         ioResult:                OSErr;
  3596.         saveA5:                    LONGINT;
  3597.         reqCode:                INTEGER;
  3598.         reserved:                ARRAY [0..1] OF LONGINT;
  3599.         serverHint:                AddrBlock;
  3600.         dsRefNum:                INTEGER;
  3601.         callID:                    LONGINT;
  3602.         identity:                AuthIdentity;
  3603.         gReserved1:                LONGINT;
  3604.         gReserved2:                LONGINT;
  3605.         gReserved3:                LONGINT;
  3606.         clientData:                LONGINT;
  3607.         dsamRecordCID:            CreationID;                                {  --> CreationID for the CSAM record }
  3608.         directoryName:            DirectoryNamePtr;                        {  --> catalog name }
  3609.         discriminator:            DirDiscriminator;                        {  --> catalog discriminator }
  3610.         features:                DirGestalt;                                {  --> capabilty flags for the catalog }
  3611.         directoryRecordCID:        CreationID;                                { <--  creationID for the catalog record }
  3612.     END;
  3613.  
  3614. {
  3615. DirRemoveDirectory: This call can be used to inform the toolbox that
  3616. catalog specified by 'directoryRecordCID'
  3617. }
  3618.     DirRemoveDirectoryPB = RECORD
  3619.         qLink:                    Ptr;
  3620.         reserved1:                LONGINT;
  3621.         reserved2:                LONGINT;
  3622.         ioCompletion:            DirIOCompletionUPP;
  3623.         ioResult:                OSErr;
  3624.         saveA5:                    LONGINT;
  3625.         reqCode:                INTEGER;
  3626.         reserved:                ARRAY [0..1] OF LONGINT;
  3627.         serverHint:                AddrBlock;
  3628.         dsRefNum:                INTEGER;
  3629.         callID:                    LONGINT;
  3630.         identity:                AuthIdentity;
  3631.         gReserved1:                LONGINT;
  3632.         gReserved2:                LONGINT;
  3633.         gReserved3:                LONGINT;
  3634.         clientData:                LONGINT;
  3635.         directoryRecordCID:        CreationID;                                {  --> creationID for the catalog record }
  3636.     END;
  3637.  
  3638. {
  3639.  * DSGetExtendedDirectoriesInfo::  This call can be used to get
  3640.  * the information of various foreign catalogs supported.
  3641.  * Typically a DE Template  may make this call to create a
  3642.  * Address template or a Gateway may make this call to findout
  3643.  * catalog name space in which MSAM may would support. 
  3644.  * Client will supply a buffer pointed by 'bufferPtr' of size 'bufferLength'. 
  3645.  * When the call completes with 'daMoreData' error, client can examine 'totalEntries'
  3646.  * returned and reissue the call with increaing buffer.
  3647.  * Toolbox will findout the private information of each of the Foreign Catalogs
  3648.  * by polling CSAM's, Gateways, and MnMServers. The Information returned
  3649.  * for each catalog will be packed in the format: 
  3650.  * typedef struct EachDirectoryData (
  3651.  *  PackedRLI                        pRLI;           //  packed RLI for the catalog
  3652.  *  OSType                            entnType;        //  Entn Type
  3653.  *  long                            hasMailSlot;   //  If this catalog has mail slot this will be 1 otherwise zero
  3654.  *    ProtoRString                    RealName;      //  Packed RString for Real Name (padded to even boundary) 
  3655.  *    ProtoRString                    comment;       //  Packed RString holding any comment for Display (padded to even boundary)
  3656.  *    long                            length;        //  data length
  3657.  *    char                            data[length];  //  data padded to even boundary
  3658.  * );
  3659.  *
  3660.  *
  3661.  *
  3662.  * typedef struct myData (
  3663.  *      EachDirectoryData    data[numberOfEntries];    // data packed in the above format
  3664.  *    );
  3665.  *
  3666.  }
  3667.     DirGetExtendedDirectoriesInfoPB = RECORD
  3668.         qLink:                    Ptr;
  3669.         reserved1:                LONGINT;
  3670.         reserved2:                LONGINT;
  3671.         ioCompletion:            DirIOCompletionUPP;
  3672.         ioResult:                OSErr;
  3673.         saveA5:                    LONGINT;
  3674.         reqCode:                INTEGER;
  3675.         reserved:                ARRAY [0..1] OF LONGINT;
  3676.         serverHint:                AddrBlock;
  3677.         dsRefNum:                INTEGER;
  3678.         callID:                    LONGINT;
  3679.         identity:                AuthIdentity;
  3680.         gReserved1:                LONGINT;
  3681.         gReserved2:                LONGINT;
  3682.         gReserved3:                LONGINT;
  3683.         clientData:                LONGINT;
  3684.         buffer:                    Ptr;                                    {  --> Pointer to a buufer where data will be returned }
  3685.         bufferSize:                LONGINT;                                {  --> Length of the buffer, Length of actual data will be returned here }
  3686.         totalEntries:            LONGINT;                                { <--  Total Number of Catalogs found }
  3687.         actualEntries:            LONGINT;                                { <--  Total Number of Catalogs entries returned }
  3688.     END;
  3689.  
  3690. {
  3691. DirGetDirectoryIconPB: With this call a client can find out about
  3692. the icons supported by the Catalog.
  3693. Both ADAP and Personal Catalog will not support this call for now.
  3694. A CSAM can support a call so that DE Extension can use this
  3695. call to find appropriate Icons.
  3696.  
  3697. Returns kOCEBufferTooSmall if icon is too small, but will update iconSize.
  3698. }
  3699.     DirGetDirectoryIconPB = RECORD
  3700.         qLink:                    Ptr;
  3701.         reserved1:                LONGINT;
  3702.         reserved2:                LONGINT;
  3703.         ioCompletion:            DirIOCompletionUPP;
  3704.         ioResult:                OSErr;
  3705.         saveA5:                    LONGINT;
  3706.         reqCode:                INTEGER;
  3707.         reserved:                ARRAY [0..1] OF LONGINT;
  3708.         serverHint:                AddrBlock;
  3709.         dsRefNum:                INTEGER;
  3710.         callID:                    LONGINT;
  3711.         identity:                AuthIdentity;
  3712.         gReserved1:                LONGINT;
  3713.         gReserved2:                LONGINT;
  3714.         gReserved3:                LONGINT;
  3715.         clientData:                LONGINT;
  3716.         pRLI:                    PackedRLIPtr;                            {  --> packed RLI for the catalog }
  3717.         iconType:                OSType;                                    {  --> Type of Icon requested }
  3718.         iconBuffer:                Ptr;                                    {  --> Buffer to hold Icon Data }
  3719.         bufferSize:                LONGINT;                                {  <-> size of buffer to hold icon data }
  3720.     END;
  3721.  
  3722. {
  3723. DirGetOCESetupRefNum: This call will return 'dsRefnum' for the OCE Setup Personal Catalog
  3724. and oceSetupRecordCID for the oceSetup Record.
  3725. Clients interested in manipulating OCE Setup Personal Catalog directly should
  3726. make this call to get 'dsRefNum'.
  3727. 'dsRefNum' will be returned in the standard field in the DirParamHeader.
  3728. }
  3729.     DirGetOCESetupRefNumPB = RECORD
  3730.         qLink:                    Ptr;
  3731.         reserved1:                LONGINT;
  3732.         reserved2:                LONGINT;
  3733.         ioCompletion:            DirIOCompletionUPP;
  3734.         ioResult:                OSErr;
  3735.         saveA5:                    LONGINT;
  3736.         reqCode:                INTEGER;
  3737.         reserved:                ARRAY [0..1] OF LONGINT;
  3738.         serverHint:                AddrBlock;
  3739.         dsRefNum:                INTEGER;
  3740.         callID:                    LONGINT;
  3741.         identity:                AuthIdentity;
  3742.         gReserved1:                LONGINT;
  3743.         gReserved2:                LONGINT;
  3744.         gReserved3:                LONGINT;
  3745.         clientData:                LONGINT;
  3746.         oceSetupRecordCID:        CreationID;                                { --> creationID for the catalog record }
  3747.     END;
  3748.  
  3749. {***************************************************************************}
  3750. { Catalog and Authentication control blocks and operation definitions }
  3751.     AuthParamBlock = RECORD
  3752.         CASE INTEGER OF
  3753.         0: (
  3754.             qLink:                        Ptr;
  3755.             reserved1:                    LONGINT;
  3756.             reserved2:                    LONGINT;
  3757.             ioCompletion:                AuthIOCompletionUPP;
  3758.             ioResult:                    OSErr;
  3759.             saveA5:                        LONGINT;
  3760.             reqCode:                    INTEGER;
  3761.             reserved:                    ARRAY [0..1] OF LONGINT;
  3762.             serverHint:                    AddrBlock;
  3763.             dsRefNum:                    INTEGER;
  3764.             callID:                        LONGINT;
  3765.             identity:                    AuthIdentity;
  3766.             gReserved1:                    LONGINT;
  3767.             gReserved2:                    LONGINT;
  3768.             gReserved3:                    LONGINT;
  3769.             clientData:                    LONGINT;
  3770.            );
  3771.         1: (
  3772.             bindIdentityPB:                AuthBindSpecificIdentityPB;
  3773.            );
  3774.         2: (
  3775.             unbindIdentityPB:            AuthUnbindSpecificIdentityPB;
  3776.            );
  3777.         3: (
  3778.             resolveCreationIDPB:        AuthResolveCreationIDPB;
  3779.            );
  3780.         4: (
  3781.             getIdentityInfoPB:            AuthGetSpecificIdentityInfoPB;
  3782.            );
  3783.         5: (
  3784.             addKeyPB:                    AuthAddKeyPB;
  3785.            );
  3786.         6: (
  3787.             changeKeyPB:                AuthChangeKeyPB;
  3788.            );
  3789.         7: (
  3790.             deleteKeyPB:                AuthDeleteKeyPB;
  3791.            );
  3792.         8: (
  3793.             passwordToKeyPB:            AuthPasswordToKeyPB;
  3794.            );
  3795.         9: (
  3796.             getCredentialsPB:            AuthGetCredentialsPB;
  3797.            );
  3798.         10: (
  3799.             decryptCredentialsPB:        AuthDecryptCredentialsPB;
  3800.            );
  3801.         11: (
  3802.             makeChallengePB:            AuthMakeChallengePB;
  3803.            );
  3804.         12: (
  3805.             makeReplyPB:                AuthMakeReplyPB;
  3806.            );
  3807.         13: (
  3808.             verifyReplyPB:                AuthVerifyReplyPB;
  3809.            );
  3810.         14: (
  3811.             getUTCTimePB:                AuthGetUTCTimePB;
  3812.            );
  3813.         15: (
  3814.             makeProxyPB:                AuthMakeProxyPB;
  3815.            );
  3816.         16: (
  3817.             tradeProxyForCredentialsPB:    AuthTradeProxyForCredentialsPB;
  3818.            );
  3819.         17: (
  3820.             getLocalIdentityPB:            AuthGetLocalIdentityPB;
  3821.            );
  3822.         18: (
  3823.             unLockLocalIdentityPB:        AuthUnlockLocalIdentityPB;
  3824.            );
  3825.         19: (
  3826.             lockLocalIdentityPB:        AuthLockLocalIdentityPB;
  3827.            );
  3828.         20: (
  3829.             localIdentityQInstallPB:    AuthAddToLocalIdentityQueuePB;
  3830.            );
  3831.         21: (
  3832.             localIdentityQRemovePB:        AuthRemoveFromLocalIdentityQueuePB;
  3833.            );
  3834.         22: (
  3835.             setupLocalIdentityPB:        AuthSetupLocalIdentityPB;
  3836.            );
  3837.         23: (
  3838.             changeLocalIdentityPB:        AuthChangeLocalIdentityPB;
  3839.            );
  3840.         24: (
  3841.             removeLocalIdentityPB:        AuthRemoveLocalIdentityPB;
  3842.            );
  3843.         25: (
  3844.             setupDirectoryIdentityPB:    OCESetupAddDirectoryInfoPB;
  3845.            );
  3846.         26: (
  3847.             changeDirectoryIdentityPB:    OCESetupChangeDirectoryInfoPB;
  3848.            );
  3849.         27: (
  3850.             removeDirectoryIdentityPB:    OCESetupRemoveDirectoryInfoPB;
  3851.            );
  3852.         28: (
  3853.             getDirectoryIdentityInfoPB:    OCESetupGetDirectoryInfoPB;
  3854.            );
  3855.     END;
  3856.  
  3857.     DirParamBlock = RECORD
  3858.         CASE INTEGER OF
  3859.         0: (
  3860.             qLink:                        Ptr;
  3861.             reserved1:                    LONGINT;
  3862.             reserved2:                    LONGINT;
  3863.             ioCompletion:                DirIOCompletionUPP;
  3864.             ioResult:                    OSErr;
  3865.             saveA5:                        LONGINT;
  3866.             reqCode:                    INTEGER;
  3867.             reserved:                    ARRAY [0..1] OF LONGINT;
  3868.             serverHint:                    AddrBlock;
  3869.             dsRefNum:                    INTEGER;
  3870.             callID:                        LONGINT;
  3871.             identity:                    AuthIdentity;
  3872.             gReserved1:                    LONGINT;
  3873.             gReserved2:                    LONGINT;
  3874.             gReserved3:                    LONGINT;
  3875.             clientData:                    LONGINT;
  3876.            );
  3877.         1: (
  3878.             addRecordPB:                DirAddRecordPB;
  3879.            );
  3880.         2: (
  3881.             deleteRecordPB:                DirDeleteRecordPB;
  3882.            );
  3883.         3: (
  3884.             enumerateGetPB:                DirEnumerateGetPB;
  3885.            );
  3886.         4: (
  3887.             enumerateParsePB:            DirEnumerateParsePB;
  3888.            );
  3889.         5: (
  3890.             findRecordGetPB:            DirFindRecordGetPB;
  3891.            );
  3892.         6: (
  3893.             findRecordParsePB:            DirFindRecordParsePB;
  3894.            );
  3895.         7: (
  3896.             lookupGetPB:                DirLookupGetPB;
  3897.            );
  3898.         8: (
  3899.             lookupParsePB:                DirLookupParsePB;
  3900.            );
  3901.         9: (
  3902.             addAttributeValuePB:        DirAddAttributeValuePB;
  3903.            );
  3904.         10: (
  3905.             deleteAttributeTypePB:        DirDeleteAttributeTypePB;
  3906.            );
  3907.         11: (
  3908.             deleteAttributeValuePB:        DirDeleteAttributeValuePB;
  3909.            );
  3910.         12: (
  3911.             changeAttributeValuePB:        DirChangeAttributeValuePB;
  3912.            );
  3913.         13: (
  3914.             verifyAttributeValuePB:        DirVerifyAttributeValuePB;
  3915.            );
  3916.         14: (
  3917.             findValuePB:                DirFindValuePB;
  3918.            );
  3919.         15: (
  3920.             enumeratePseudonymGetPB:    DirEnumeratePseudonymGetPB;
  3921.            );
  3922.         16: (
  3923.             enumeratePseudonymParsePB:    DirEnumeratePseudonymParsePB;
  3924.            );
  3925.         17: (
  3926.             addPseudonymPB:                DirAddPseudonymPB;
  3927.            );
  3928.         18: (
  3929.             deletePseudonymPB:            DirDeletePseudonymPB;
  3930.            );
  3931.         19: (
  3932.             addAliasPB:                    DirAddAliasPB;
  3933.            );
  3934.         20: (
  3935.             enumerateAttributeTypesGetPB: DirEnumerateAttributeTypesGetPB;
  3936.            );
  3937.         21: (
  3938.             enumerateAttributeTypesParsePB: DirEnumerateAttributeTypesParsePB;
  3939.            );
  3940.         22: (
  3941.             getNameAndTypePB:            DirGetNameAndTypePB;
  3942.            );
  3943.         23: (
  3944.             setNameAndTypePB:            DirSetNameAndTypePB;
  3945.            );
  3946.         24: (
  3947.             getRecordMetaInfoPB:        DirGetRecordMetaInfoPB;
  3948.            );
  3949.         25: (
  3950.             getDNodeMetaInfoPB:            DirGetDNodeMetaInfoPB;
  3951.            );
  3952.         26: (
  3953.             getDirectoryInfoPB:            DirGetDirectoryInfoPB;
  3954.            );
  3955.         27: (
  3956.             getDNodeAccessControlGetPB:    DirGetDNodeAccessControlGetPB;
  3957.            );
  3958.         28: (
  3959.             getDNodeAccessControlParsePB: DirGetDNodeAccessControlParsePB;
  3960.            );
  3961.         29: (
  3962.             getRecordAccessControlGetPB: DirGetRecordAccessControlGetPB;
  3963.            );
  3964.         30: (
  3965.             getRecordAccessControlParsePB: DirGetRecordAccessControlParsePB;
  3966.            );
  3967.         31: (
  3968.             getAttributeAccessControlGetPB: DirGetAttributeAccessControlGetPB;
  3969.            );
  3970.         32: (
  3971.             getAttributeAccessControlParsePB: DirGetAttributeAccessControlParsePB;
  3972.            );
  3973.         33: (
  3974.             enumerateDirectoriesGetPB:    DirEnumerateDirectoriesGetPB;
  3975.            );
  3976.         34: (
  3977.             enumerateDirectoriesParsePB: DirEnumerateDirectoriesParsePB;
  3978.            );
  3979.         35: (
  3980.             addADAPDirectoryPB:            DirAddADAPDirectoryPB;
  3981.            );
  3982.         36: (
  3983.             removeDirectoryPB:            DirRemoveDirectoryPB;
  3984.            );
  3985.         37: (
  3986.             netSearchADAPDirectoriesGetPB: DirNetSearchADAPDirectoriesGetPB;
  3987.            );
  3988.         38: (
  3989.             netSearchADAPDirectoriesParsePB: DirNetSearchADAPDirectoriesParsePB;
  3990.            );
  3991.         39: (
  3992.             findADAPDirectoryByNetSearchPB: DirFindADAPDirectoryByNetSearchPB;
  3993.            );
  3994.         40: (
  3995.             mapDNodeNumberToPathNamePB:    DirMapDNodeNumberToPathNamePB;
  3996.            );
  3997.         41: (
  3998.             mapPathNameToDNodeNumberPB:    DirMapPathNameToDNodeNumberPB;
  3999.            );
  4000.         42: (
  4001.             getLocalNetworkSpecPB:        DirGetLocalNetworkSpecPB;
  4002.            );
  4003.         43: (
  4004.             getDNodeInfoPB:                DirGetDNodeInfoPB;
  4005.            );
  4006.         44: (
  4007.             createPersonalDirectoryPB:    DirCreatePersonalDirectoryPB;
  4008.            );
  4009.         45: (
  4010.             openPersonalDirectoryPB:    DirOpenPersonalDirectoryPB;
  4011.            );
  4012.         46: (
  4013.             closePersonalDirectoryPB:    DirClosePersonalDirectoryPB;
  4014.            );
  4015.         47: (
  4016.             makePersonalDirectoryRLIPB:    DirMakePersonalDirectoryRLIPB;
  4017.            );
  4018.         48: (
  4019.             addDSAMPB:                    DirAddDSAMPB;
  4020.            );
  4021.         49: (
  4022.             instantiateDSAMPB:            DirInstantiateDSAMPB;
  4023.            );
  4024.         50: (
  4025.             removeDSAMPB:                DirRemoveDSAMPB;
  4026.            );
  4027.         51: (
  4028.             addDSAMDirectoryPB:            DirAddDSAMDirectoryPB;
  4029.            );
  4030.         52: (
  4031.             getExtendedDirectoriesInfoPB: DirGetExtendedDirectoriesInfoPB;
  4032.            );
  4033.         53: (
  4034.             getDirectoryIconPB:            DirGetDirectoryIconPB;
  4035.            );
  4036.         54: (
  4037.             dirGetOCESetupRefNumPB:        DirGetOCESetupRefNumPB;
  4038.            );
  4039.         55: (
  4040.             abortPB:                    DirAbortPB;
  4041.            );
  4042.     END;
  4043.  
  4044. CONST
  4045.     uppAuthIOCompletionProcInfo = $000000C0; { PROCEDURE (4 byte param); }
  4046.     uppNotificationProcInfo = $00003FD0; { FUNCTION (4 byte param, 4 byte param, 4 byte param, 4 byte param): 1 byte result; }
  4047.     uppDirIOCompletionProcInfo = $000000C0; { PROCEDURE (4 byte param); }
  4048.     uppForEachDirEnumSpecProcInfo = $000003D0; { FUNCTION (4 byte param, 4 byte param): 1 byte result; }
  4049.     uppForEachRecordProcInfo = $00000FD0; { FUNCTION (4 byte param, 4 byte param, 4 byte param): 1 byte result; }
  4050.     uppForEachLookupRecordIDProcInfo = $000003D0; { FUNCTION (4 byte param, 4 byte param): 1 byte result; }
  4051.     uppForEachAttrTypeLookupProcInfo = $00000FD0; { FUNCTION (4 byte param, 4 byte param, 4 byte param): 1 byte result; }
  4052.     uppForEachAttrValueProcInfo = $000003D0; { FUNCTION (4 byte param, 4 byte param): 1 byte result; }
  4053.     uppForEachAttrTypeProcInfo = $000003D0; { FUNCTION (4 byte param, 4 byte param): 1 byte result; }
  4054.     uppForEachRecordIDProcInfo = $000003D0; { FUNCTION (4 byte param, 4 byte param): 1 byte result; }
  4055.     uppForEachDirectoryProcInfo = $00003FD0; { FUNCTION (4 byte param, 4 byte param, 4 byte param, 4 byte param): 1 byte result; }
  4056.     uppForEachADAPDirectoryProcInfo = $0000FFD0; { FUNCTION (4 byte param, 4 byte param, 4 byte param, 4 byte param, 4 byte param): 1 byte result; }
  4057.     uppForEachDNodeAccessControlProcInfo = $0000FFD0; { FUNCTION (4 byte param, 4 byte param, 4 byte param, 4 byte param, 4 byte param): 1 byte result; }
  4058.     uppForEachRecordAccessControlProcInfo = $0000FFD0; { FUNCTION (4 byte param, 4 byte param, 4 byte param, 4 byte param, 4 byte param): 1 byte result; }
  4059.     uppForEachAttributeAccessControlProcInfo = $0000FFD0; { FUNCTION (4 byte param, 4 byte param, 4 byte param, 4 byte param, 4 byte param): 1 byte result; }
  4060.     uppDSAMDirProcInfo = $000007E0; { FUNCTION (4 byte param, 4 byte param, 1 byte param): 2 byte result; }
  4061.     uppDSAMDirParseProcInfo = $000007E0; { FUNCTION (4 byte param, 4 byte param, 1 byte param): 2 byte result; }
  4062.     uppDSAMAuthProcInfo = $000007E0; { FUNCTION (4 byte param, 4 byte param, 1 byte param): 2 byte result; }
  4063.  
  4064. PROCEDURE CallAuthIOCompletionProc(paramBlock: AuthParamBlockPtr; userRoutine: AuthIOCompletionUPP);
  4065.     {$IFC NOT GENERATINGCFM}
  4066.     INLINE $205F, $4E90;
  4067.     {$ENDC}
  4068.  
  4069. FUNCTION CallNotificationProc(clientData: LONGINT; callValue: AuthLocalIdentityOp; actionValue: AuthLocalIdentityLockAction; identity: LocalIdentity; userRoutine: NotificationUPP): BOOLEAN;
  4070.     {$IFC NOT GENERATINGCFM}
  4071.     INLINE $205F, $4E90;
  4072.     {$ENDC}
  4073.  
  4074. PROCEDURE CallDirIOCompletionProc(paramBlock: DirParamBlockPtr; userRoutine: DirIOCompletionUPP);
  4075.     {$IFC NOT GENERATINGCFM}
  4076.     INLINE $205F, $4E90;
  4077.     {$ENDC}
  4078.  
  4079. FUNCTION CallForEachDirEnumSpecProc(clientData: LONGINT; {CONST}VAR enumSpec: DirEnumSpec; userRoutine: ForEachDirEnumSpecUPP): BOOLEAN;
  4080.     {$IFC NOT GENERATINGCFM}
  4081.     INLINE $205F, $4E90;
  4082.     {$ENDC}
  4083.  
  4084. FUNCTION CallForEachRecordProc(clientData: LONGINT; {CONST}VAR enumSpec: DirEnumSpec; pRLI: PackedRLIPtr; userRoutine: ForEachRecordUPP): BOOLEAN;
  4085.     {$IFC NOT GENERATINGCFM}
  4086.     INLINE $205F, $4E90;
  4087.     {$ENDC}
  4088.  
  4089. FUNCTION CallForEachLookupRecordIDProc(clientData: LONGINT; {CONST}VAR recordID: RecordID; userRoutine: ForEachLookupRecordIDUPP): BOOLEAN;
  4090.     {$IFC NOT GENERATINGCFM}
  4091.     INLINE $205F, $4E90;
  4092.     {$ENDC}
  4093.  
  4094. FUNCTION CallForEachAttrTypeLookupProc(clientData: LONGINT; {CONST}VAR attrType: AttributeType; myAttrAccMask: AccessMask; userRoutine: ForEachAttrTypeLookupUPP): BOOLEAN;
  4095.     {$IFC NOT GENERATINGCFM}
  4096.     INLINE $205F, $4E90;
  4097.     {$ENDC}
  4098.  
  4099. FUNCTION CallForEachAttrValueProc(clientData: LONGINT; {CONST}VAR attribute: Attribute; userRoutine: ForEachAttrValueUPP): BOOLEAN;
  4100.     {$IFC NOT GENERATINGCFM}
  4101.     INLINE $205F, $4E90;
  4102.     {$ENDC}
  4103.  
  4104. FUNCTION CallForEachAttrTypeProc(clientData: LONGINT; {CONST}VAR attrType: AttributeType; userRoutine: ForEachAttrTypeUPP): BOOLEAN;
  4105.     {$IFC NOT GENERATINGCFM}
  4106.     INLINE $205F, $4E90;
  4107.     {$ENDC}
  4108.  
  4109. FUNCTION CallForEachRecordIDProc(clientData: LONGINT; {CONST}VAR recordID: RecordID; userRoutine: ForEachRecordIDUPP): BOOLEAN;
  4110.     {$IFC NOT GENERATINGCFM}
  4111.     INLINE $205F, $4E90;
  4112.     {$ENDC}
  4113.  
  4114. FUNCTION CallForEachDirectoryProc(clientData: LONGINT; {CONST}VAR dirName: DirectoryName; {CONST}VAR discriminator: DirDiscriminator; features: DirGestalt; userRoutine: ForEachDirectoryUPP): BOOLEAN;
  4115.     {$IFC NOT GENERATINGCFM}
  4116.     INLINE $205F, $4E90;
  4117.     {$ENDC}
  4118.  
  4119. FUNCTION CallForEachADAPDirectoryProc(clientData: LONGINT; {CONST}VAR dirName: DirectoryName; {CONST}VAR discriminator: DirDiscriminator; features: DirGestalt; serverHint: AddrBlock; userRoutine: ForEachADAPDirectoryUPP): BOOLEAN;
  4120.     {$IFC NOT GENERATINGCFM}
  4121.     INLINE $205F, $4E90;
  4122.     {$ENDC}
  4123.  
  4124. FUNCTION CallForEachDNodeAccessControlProc(clientData: LONGINT; {CONST}VAR dsObj: DSSpec; activeDnodeAccMask: AccessMask; defaultRecordAccMask: AccessMask; defaultAttributeAccMask: AccessMask; userRoutine: ForEachDNodeAccessControlUPP): BOOLEAN;
  4125.     {$IFC NOT GENERATINGCFM}
  4126.     INLINE $205F, $4E90;
  4127.     {$ENDC}
  4128.  
  4129. FUNCTION CallForEachRecordAccessControlProc(clientData: LONGINT; {CONST}VAR dsObj: DSSpec; activeDnodeAccMask: AccessMask; activeRecordAccMask: AccessMask; defaultAttributeAccMask: AccessMask; userRoutine: ForEachRecordAccessControlUPP): BOOLEAN;
  4130.     {$IFC NOT GENERATINGCFM}
  4131.     INLINE $205F, $4E90;
  4132.     {$ENDC}
  4133.  
  4134. FUNCTION CallForEachAttributeAccessControlProc(clientData: LONGINT; {CONST}VAR dsObj: DSSpec; activeDnodeAccMask: AccessMask; activeRecordAccMask: AccessMask; activeAttributeAccMask: AccessMask; userRoutine: ForEachAttributeAccessControlUPP): BOOLEAN;
  4135.     {$IFC NOT GENERATINGCFM}
  4136.     INLINE $205F, $4E90;
  4137.     {$ENDC}
  4138.  
  4139. FUNCTION CallDSAMDirProc(dsamData: Ptr; paramBlock: DirParamBlockPtr; async: BOOLEAN; userRoutine: DSAMDirUPP): OSErr;
  4140.     {$IFC NOT GENERATINGCFM}
  4141.     INLINE $205F, $4E90;
  4142.     {$ENDC}
  4143.  
  4144. FUNCTION CallDSAMDirParseProc(dsamData: Ptr; paramBlock: DirParamBlockPtr; async: BOOLEAN; userRoutine: DSAMDirParseUPP): OSErr;
  4145.     {$IFC NOT GENERATINGCFM}
  4146.     INLINE $205F, $4E90;
  4147.     {$ENDC}
  4148.  
  4149. FUNCTION CallDSAMAuthProc(dsamData: Ptr; pb: AuthParamBlockPtr; async: BOOLEAN; userRoutine: DSAMAuthUPP): OSErr;
  4150.     {$IFC NOT GENERATINGCFM}
  4151.     INLINE $205F, $4E90;
  4152.     {$ENDC}
  4153.  
  4154. FUNCTION NewAuthIOCompletionProc(userRoutine: AuthIOCompletionProcPtr): AuthIOCompletionUPP;
  4155.     {$IFC NOT GENERATINGCFM }
  4156.     INLINE $2E9F;
  4157.     {$ENDC}
  4158.  
  4159. FUNCTION NewNotificationProc(userRoutine: NotificationProcPtr): NotificationUPP;
  4160.     {$IFC NOT GENERATINGCFM }
  4161.     INLINE $2E9F;
  4162.     {$ENDC}
  4163.  
  4164. FUNCTION NewDirIOCompletionProc(userRoutine: DirIOCompletionProcPtr): DirIOCompletionUPP;
  4165.     {$IFC NOT GENERATINGCFM }
  4166.     INLINE $2E9F;
  4167.     {$ENDC}
  4168.  
  4169. FUNCTION NewForEachDirEnumSpecProc(userRoutine: ForEachDirEnumSpecProcPtr): ForEachDirEnumSpecUPP;
  4170.     {$IFC NOT GENERATINGCFM }
  4171.     INLINE $2E9F;
  4172.     {$ENDC}
  4173.  
  4174. FUNCTION NewForEachRecordProc(userRoutine: ForEachRecordProcPtr): ForEachRecordUPP;
  4175.     {$IFC NOT GENERATINGCFM }
  4176.     INLINE $2E9F;
  4177.     {$ENDC}
  4178.  
  4179. FUNCTION NewForEachLookupRecordIDProc(userRoutine: ForEachLookupRecordIDProcPtr): ForEachLookupRecordIDUPP;
  4180.     {$IFC NOT GENERATINGCFM }
  4181.     INLINE $2E9F;
  4182.     {$ENDC}
  4183.  
  4184. FUNCTION NewForEachAttrTypeLookupProc(userRoutine: ForEachAttrTypeLookupProcPtr): ForEachAttrTypeLookupUPP;
  4185.     {$IFC NOT GENERATINGCFM }
  4186.     INLINE $2E9F;
  4187.     {$ENDC}
  4188.  
  4189. FUNCTION NewForEachAttrValueProc(userRoutine: ForEachAttrValueProcPtr): ForEachAttrValueUPP;
  4190.     {$IFC NOT GENERATINGCFM }
  4191.     INLINE $2E9F;
  4192.     {$ENDC}
  4193.  
  4194. FUNCTION NewForEachAttrTypeProc(userRoutine: ForEachAttrTypeProcPtr): ForEachAttrTypeUPP;
  4195.     {$IFC NOT GENERATINGCFM }
  4196.     INLINE $2E9F;
  4197.     {$ENDC}
  4198.  
  4199. FUNCTION NewForEachRecordIDProc(userRoutine: ForEachRecordIDProcPtr): ForEachRecordIDUPP;
  4200.     {$IFC NOT GENERATINGCFM }
  4201.     INLINE $2E9F;
  4202.     {$ENDC}
  4203.  
  4204. FUNCTION NewForEachDirectoryProc(userRoutine: ForEachDirectoryProcPtr): ForEachDirectoryUPP;
  4205.     {$IFC NOT GENERATINGCFM }
  4206.     INLINE $2E9F;
  4207.     {$ENDC}
  4208.  
  4209. FUNCTION NewForEachADAPDirectoryProc(userRoutine: ForEachADAPDirectoryProcPtr): ForEachADAPDirectoryUPP;
  4210.     {$IFC NOT GENERATINGCFM }
  4211.     INLINE $2E9F;
  4212.     {$ENDC}
  4213.  
  4214. FUNCTION NewForEachDNodeAccessControlProc(userRoutine: ForEachDNodeAccessControlProcPtr): ForEachDNodeAccessControlUPP;
  4215.     {$IFC NOT GENERATINGCFM }
  4216.     INLINE $2E9F;
  4217.     {$ENDC}
  4218.  
  4219. FUNCTION NewForEachRecordAccessControlProc(userRoutine: ForEachRecordAccessControlProcPtr): ForEachRecordAccessControlUPP;
  4220.     {$IFC NOT GENERATINGCFM }
  4221.     INLINE $2E9F;
  4222.     {$ENDC}
  4223.  
  4224. FUNCTION NewForEachAttributeAccessControlProc(userRoutine: ForEachAttributeAccessControlProcPtr): ForEachAttributeAccessControlUPP;
  4225.     {$IFC NOT GENERATINGCFM }
  4226.     INLINE $2E9F;
  4227.     {$ENDC}
  4228.  
  4229. FUNCTION NewDSAMDirProc(userRoutine: DSAMDirProcPtr): DSAMDirUPP;
  4230.     {$IFC NOT GENERATINGCFM }
  4231.     INLINE $2E9F;
  4232.     {$ENDC}
  4233.  
  4234. FUNCTION NewDSAMDirParseProc(userRoutine: DSAMDirParseProcPtr): DSAMDirParseUPP;
  4235.     {$IFC NOT GENERATINGCFM }
  4236.     INLINE $2E9F;
  4237.     {$ENDC}
  4238.  
  4239. FUNCTION NewDSAMAuthProc(userRoutine: DSAMAuthProcPtr): DSAMAuthUPP;
  4240.     {$IFC NOT GENERATINGCFM }
  4241.     INLINE $2E9F;
  4242.     {$ENDC}
  4243.  
  4244. FUNCTION AuthBindSpecificIdentity(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4245.     {$IFC NOT GENERATINGCFM}
  4246.     INLINE $3F3C, $200, $AA5E;
  4247.     {$ENDC}
  4248. FUNCTION AuthUnbindSpecificIdentity(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4249.     {$IFC NOT GENERATINGCFM}
  4250.     INLINE $3F3C, $201, $AA5E;
  4251.     {$ENDC}
  4252. FUNCTION AuthResolveCreationID(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4253.     {$IFC NOT GENERATINGCFM}
  4254.     INLINE $3F3C, $202, $AA5E;
  4255.     {$ENDC}
  4256. FUNCTION AuthGetSpecificIdentityInfo(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4257.     {$IFC NOT GENERATINGCFM}
  4258.     INLINE $3F3C, $203, $AA5E;
  4259.     {$ENDC}
  4260. FUNCTION AuthAddKey(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4261.     {$IFC NOT GENERATINGCFM}
  4262.     INLINE $3F3C, $207, $AA5E;
  4263.     {$ENDC}
  4264. FUNCTION AuthChangeKey(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4265.     {$IFC NOT GENERATINGCFM}
  4266.     INLINE $3F3C, $208, $AA5E;
  4267.     {$ENDC}
  4268. FUNCTION AuthDeleteKey(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4269.     {$IFC NOT GENERATINGCFM}
  4270.     INLINE $3F3C, $209, $AA5E;
  4271.     {$ENDC}
  4272. FUNCTION AuthPasswordToKey(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4273.     {$IFC NOT GENERATINGCFM}
  4274.     INLINE $3F3C, $20A, $AA5E;
  4275.     {$ENDC}
  4276. FUNCTION AuthGetCredentials(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4277.     {$IFC NOT GENERATINGCFM}
  4278.     INLINE $3F3C, $20B, $AA5E;
  4279.     {$ENDC}
  4280. FUNCTION AuthDecryptCredentials(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4281.     {$IFC NOT GENERATINGCFM}
  4282.     INLINE $3F3C, $20C, $AA5E;
  4283.     {$ENDC}
  4284. FUNCTION AuthMakeChallenge(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4285.     {$IFC NOT GENERATINGCFM}
  4286.     INLINE $3F3C, $20F, $AA5E;
  4287.     {$ENDC}
  4288. FUNCTION AuthMakeReply(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4289.     {$IFC NOT GENERATINGCFM}
  4290.     INLINE $3F3C, $210, $AA5E;
  4291.     {$ENDC}
  4292. FUNCTION AuthVerifyReply(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4293.     {$IFC NOT GENERATINGCFM}
  4294.     INLINE $3F3C, $211, $AA5E;
  4295.     {$ENDC}
  4296. FUNCTION AuthGetUTCTime(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4297.     {$IFC NOT GENERATINGCFM}
  4298.     INLINE $3F3C, $21A, $AA5E;
  4299.     {$ENDC}
  4300. FUNCTION AuthMakeProxy(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4301.     {$IFC NOT GENERATINGCFM}
  4302.     INLINE $3F3C, $212, $AA5E;
  4303.     {$ENDC}
  4304. FUNCTION AuthTradeProxyForCredentials(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4305.     {$IFC NOT GENERATINGCFM}
  4306.     INLINE $3F3C, $213, $AA5E;
  4307.     {$ENDC}
  4308. { Local Identity API }
  4309. FUNCTION AuthGetLocalIdentity(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4310.     {$IFC NOT GENERATINGCFM}
  4311.     INLINE $3F3C, $204, $AA5E;
  4312.     {$ENDC}
  4313. FUNCTION AuthUnlockLocalIdentity(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4314.     {$IFC NOT GENERATINGCFM}
  4315.     INLINE $3F3C, $214, $AA5E;
  4316.     {$ENDC}
  4317. FUNCTION AuthLockLocalIdentity(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4318.     {$IFC NOT GENERATINGCFM}
  4319.     INLINE $3F3C, $215, $AA5E;
  4320.     {$ENDC}
  4321. FUNCTION AuthAddToLocalIdentityQueue(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4322.     {$IFC NOT GENERATINGCFM}
  4323.     INLINE $3F3C, $205, $AA5E;
  4324.     {$ENDC}
  4325. FUNCTION AuthRemoveFromLocalIdentityQueue(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4326.     {$IFC NOT GENERATINGCFM}
  4327.     INLINE $3F3C, $206, $AA5E;
  4328.     {$ENDC}
  4329. FUNCTION AuthSetupLocalIdentity(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4330.     {$IFC NOT GENERATINGCFM}
  4331.     INLINE $3F3C, $216, $AA5E;
  4332.     {$ENDC}
  4333. FUNCTION AuthChangeLocalIdentity(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4334.     {$IFC NOT GENERATINGCFM}
  4335.     INLINE $3F3C, $217, $AA5E;
  4336.     {$ENDC}
  4337. FUNCTION AuthRemoveLocalIdentity(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4338.     {$IFC NOT GENERATINGCFM}
  4339.     INLINE $3F3C, $218, $AA5E;
  4340.     {$ENDC}
  4341. FUNCTION DirAddRecord(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4342.     {$IFC NOT GENERATINGCFM}
  4343.     INLINE $3F3C, $109, $AA5E;
  4344.     {$ENDC}
  4345. FUNCTION DirDeleteRecord(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4346.     {$IFC NOT GENERATINGCFM}
  4347.     INLINE $3F3C, $10A, $AA5E;
  4348.     {$ENDC}
  4349. FUNCTION DirEnumerateGet(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4350.     {$IFC NOT GENERATINGCFM}
  4351.     INLINE $3F3C, $111, $AA5E;
  4352.     {$ENDC}
  4353. FUNCTION DirEnumerateParse(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4354.     {$IFC NOT GENERATINGCFM}
  4355.     INLINE $3F3C, $101, $AA5E;
  4356.     {$ENDC}
  4357. FUNCTION DirFindRecordGet(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4358.     {$IFC NOT GENERATINGCFM}
  4359.     INLINE $3F3C, $140, $AA5E;
  4360.     {$ENDC}
  4361. FUNCTION DirFindRecordParse(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4362.     {$IFC NOT GENERATINGCFM}
  4363.     INLINE $3F3C, $141, $AA5E;
  4364.     {$ENDC}
  4365. FUNCTION DirLookupGet(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4366.     {$IFC NOT GENERATINGCFM}
  4367.     INLINE $3F3C, $117, $AA5E;
  4368.     {$ENDC}
  4369. FUNCTION DirLookupParse(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4370.     {$IFC NOT GENERATINGCFM}
  4371.     INLINE $3F3C, $102, $AA5E;
  4372.     {$ENDC}
  4373. FUNCTION DirAddAttributeValue(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4374.     {$IFC NOT GENERATINGCFM}
  4375.     INLINE $3F3C, $10B, $AA5E;
  4376.     {$ENDC}
  4377. FUNCTION DirDeleteAttributeValue(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4378.     {$IFC NOT GENERATINGCFM}
  4379.     INLINE $3F3C, $10C, $AA5E;
  4380.     {$ENDC}
  4381. FUNCTION DirDeleteAttributeType(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4382.     {$IFC NOT GENERATINGCFM}
  4383.     INLINE $3F3C, $130, $AA5E;
  4384.     {$ENDC}
  4385. FUNCTION DirChangeAttributeValue(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4386.     {$IFC NOT GENERATINGCFM}
  4387.     INLINE $3F3C, $10D, $AA5E;
  4388.     {$ENDC}
  4389. FUNCTION DirVerifyAttributeValue(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4390.     {$IFC NOT GENERATINGCFM}
  4391.     INLINE $3F3C, $10E, $AA5E;
  4392.     {$ENDC}
  4393. FUNCTION DirFindValue(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4394.     {$IFC NOT GENERATINGCFM}
  4395.     INLINE $3F3C, $126, $AA5E;
  4396.     {$ENDC}
  4397. FUNCTION DirEnumerateAttributeTypesGet(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4398.     {$IFC NOT GENERATINGCFM}
  4399.     INLINE $3F3C, $112, $AA5E;
  4400.     {$ENDC}
  4401. FUNCTION DirEnumerateAttributeTypesParse(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4402.     {$IFC NOT GENERATINGCFM}
  4403.     INLINE $3F3C, $103, $AA5E;
  4404.     {$ENDC}
  4405. FUNCTION DirAddPseudonym(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4406.     {$IFC NOT GENERATINGCFM}
  4407.     INLINE $3F3C, $10F, $AA5E;
  4408.     {$ENDC}
  4409. FUNCTION DirDeletePseudonym(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4410.     {$IFC NOT GENERATINGCFM}
  4411.     INLINE $3F3C, $110, $AA5E;
  4412.     {$ENDC}
  4413. FUNCTION DirAddAlias(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4414.     {$IFC NOT GENERATINGCFM}
  4415.     INLINE $3F3C, $11C, $AA5E;
  4416.     {$ENDC}
  4417. FUNCTION DirEnumeratePseudonymGet(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4418.     {$IFC NOT GENERATINGCFM}
  4419.     INLINE $3F3C, $113, $AA5E;
  4420.     {$ENDC}
  4421. FUNCTION DirEnumeratePseudonymParse(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4422.     {$IFC NOT GENERATINGCFM}
  4423.     INLINE $3F3C, $104, $AA5E;
  4424.     {$ENDC}
  4425. FUNCTION DirGetNameAndType(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4426.     {$IFC NOT GENERATINGCFM}
  4427.     INLINE $3F3C, $114, $AA5E;
  4428.     {$ENDC}
  4429. FUNCTION DirSetNameAndType(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4430.     {$IFC NOT GENERATINGCFM}
  4431.     INLINE $3F3C, $115, $AA5E;
  4432.     {$ENDC}
  4433. FUNCTION DirGetRecordMetaInfo(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4434.     {$IFC NOT GENERATINGCFM}
  4435.     INLINE $3F3C, $116, $AA5E;
  4436.     {$ENDC}
  4437. FUNCTION DirGetDNodeMetaInfo(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4438.     {$IFC NOT GENERATINGCFM}
  4439.     INLINE $3F3C, $118, $AA5E;
  4440.     {$ENDC}
  4441. FUNCTION DirGetDirectoryInfo(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4442.     {$IFC NOT GENERATINGCFM}
  4443.     INLINE $3F3C, $119, $AA5E;
  4444.     {$ENDC}
  4445. FUNCTION DirGetDNodeAccessControlGet(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4446.     {$IFC NOT GENERATINGCFM}
  4447.     INLINE $3F3C, $12A, $AA5E;
  4448.     {$ENDC}
  4449. FUNCTION DirGetDNodeAccessControlParse(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4450.     {$IFC NOT GENERATINGCFM}
  4451.     INLINE $3F3C, $12F, $AA5E;
  4452.     {$ENDC}
  4453. FUNCTION DirGetRecordAccessControlGet(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4454.     {$IFC NOT GENERATINGCFM}
  4455.     INLINE $3F3C, $12C, $AA5E;
  4456.     {$ENDC}
  4457. FUNCTION DirGetRecordAccessControlParse(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4458.     {$IFC NOT GENERATINGCFM}
  4459.     INLINE $3F3C, $134, $AA5E;
  4460.     {$ENDC}
  4461. FUNCTION DirGetAttributeAccessControlGet(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4462.     {$IFC NOT GENERATINGCFM}
  4463.     INLINE $3F3C, $12E, $AA5E;
  4464.     {$ENDC}
  4465. FUNCTION DirGetAttributeAccessControlParse(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4466.     {$IFC NOT GENERATINGCFM}
  4467.     INLINE $3F3C, $138, $AA5E;
  4468.     {$ENDC}
  4469. FUNCTION DirEnumerateDirectoriesGet(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4470.     {$IFC NOT GENERATINGCFM}
  4471.     INLINE $3F3C, $11A, $AA5E;
  4472.     {$ENDC}
  4473. FUNCTION DirEnumerateDirectoriesParse(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4474.     {$IFC NOT GENERATINGCFM}
  4475.     INLINE $3F3C, $106, $AA5E;
  4476.     {$ENDC}
  4477. FUNCTION DirMapPathNameToDNodeNumber(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4478.     {$IFC NOT GENERATINGCFM}
  4479.     INLINE $3F3C, $122, $AA5E;
  4480.     {$ENDC}
  4481. FUNCTION DirMapDNodeNumberToPathName(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4482.     {$IFC NOT GENERATINGCFM}
  4483.     INLINE $3F3C, $123, $AA5E;
  4484.     {$ENDC}
  4485. FUNCTION DirGetLocalNetworkSpec(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4486.     {$IFC NOT GENERATINGCFM}
  4487.     INLINE $3F3C, $124, $AA5E;
  4488.     {$ENDC}
  4489. FUNCTION DirGetDNodeInfo(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4490.     {$IFC NOT GENERATINGCFM}
  4491.     INLINE $3F3C, $125, $AA5E;
  4492.     {$ENDC}
  4493. {  Trap Dispatchers for Personal Catalog and CSAM Extensions }
  4494. FUNCTION DirCreatePersonalDirectory(paramBlock: DirParamBlockPtr): OSErr;
  4495.     {$IFC NOT GENERATINGCFM}
  4496.     INLINE $7000, $1f00, $3F3C, $11F, $AA5E;
  4497.     {$ENDC}
  4498. FUNCTION DirOpenPersonalDirectory(paramBlock: DirParamBlockPtr): OSErr;
  4499.     {$IFC NOT GENERATINGCFM}
  4500.     INLINE $7000, $1f00, $3F3C, $11E, $AA5E;
  4501.     {$ENDC}
  4502. FUNCTION DirClosePersonalDirectory(paramBlock: DirParamBlockPtr): OSErr;
  4503.     {$IFC NOT GENERATINGCFM}
  4504.     INLINE $7000, $1f00, $3F3C, $131, $AA5E;
  4505.     {$ENDC}
  4506. FUNCTION DirMakePersonalDirectoryRLI(paramBlock: DirParamBlockPtr): OSErr;
  4507.     {$IFC NOT GENERATINGCFM}
  4508.     INLINE $7000, $1f00, $3F3C, $132, $AA5E;
  4509.     {$ENDC}
  4510. FUNCTION DirAddDSAM(paramBlock: DirParamBlockPtr): OSErr;
  4511.     {$IFC NOT GENERATINGCFM}
  4512.     INLINE $7000, $1f00, $3F3C, $11D, $AA5E;
  4513.     {$ENDC}
  4514. FUNCTION DirInstantiateDSAM(paramBlock: DirParamBlockPtr): OSErr;
  4515.     {$IFC NOT GENERATINGCFM}
  4516.     INLINE $7000, $1f00, $3F3C, $127, $AA5E;
  4517.     {$ENDC}
  4518. FUNCTION DirRemoveDSAM(paramBlock: DirParamBlockPtr): OSErr;
  4519.     {$IFC NOT GENERATINGCFM}
  4520.     INLINE $7000, $1f00, $3F3C, $120, $AA5E;
  4521.     {$ENDC}
  4522. FUNCTION DirAddDSAMDirectory(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4523.     {$IFC NOT GENERATINGCFM}
  4524.     INLINE $3F3C, $133, $AA5E;
  4525.     {$ENDC}
  4526. FUNCTION DirGetExtendedDirectoriesInfo(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4527.     {$IFC NOT GENERATINGCFM}
  4528.     INLINE $3F3C, $136, $AA5E;
  4529.     {$ENDC}
  4530. FUNCTION DirGetDirectoryIcon(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4531.     {$IFC NOT GENERATINGCFM}
  4532.     INLINE $3F3C, $121, $AA5E;
  4533.     {$ENDC}
  4534. FUNCTION DirAddADAPDirectory(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4535.     {$IFC NOT GENERATINGCFM}
  4536.     INLINE $3F3C, $137, $AA5E;
  4537.     {$ENDC}
  4538. FUNCTION DirRemoveDirectory(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4539.     {$IFC NOT GENERATINGCFM}
  4540.     INLINE $3F3C, $135, $AA5E;
  4541.     {$ENDC}
  4542. FUNCTION DirNetSearchADAPDirectoriesGet(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4543.     {$IFC NOT GENERATINGCFM}
  4544.     INLINE $3F3C, $108, $AA5E;
  4545.     {$ENDC}
  4546. FUNCTION DirNetSearchADAPDirectoriesParse(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4547.     {$IFC NOT GENERATINGCFM}
  4548.     INLINE $3F3C, $105, $AA5E;
  4549.     {$ENDC}
  4550. FUNCTION DirFindADAPDirectoryByNetSearch(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4551.     {$IFC NOT GENERATINGCFM}
  4552.     INLINE $3F3C, $107, $AA5E;
  4553.     {$ENDC}
  4554. FUNCTION DirGetOCESetupRefNum(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4555.     {$IFC NOT GENERATINGCFM}
  4556.     INLINE $3F3C, $128, $AA5E;
  4557.     {$ENDC}
  4558. FUNCTION DirAbort(paramBlock: DirParamBlockPtr): OSErr;
  4559.     {$IFC NOT GENERATINGCFM}
  4560.     INLINE $7000, $1f00, $3F3C, $11B, $AA5E;
  4561.     {$ENDC}
  4562. FUNCTION OCESetupAddDirectoryInfo(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4563.     {$IFC NOT GENERATINGCFM}
  4564.     INLINE $3F3C, $219, $AA5E;
  4565.     {$ENDC}
  4566. FUNCTION OCESetupChangeDirectoryInfo(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4567.     {$IFC NOT GENERATINGCFM}
  4568.     INLINE $3F3C, $21B, $AA5E;
  4569.     {$ENDC}
  4570. FUNCTION OCESetupRemoveDirectoryInfo(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4571.     {$IFC NOT GENERATINGCFM}
  4572.     INLINE $3F3C, $20D, $AA5E;
  4573.     {$ENDC}
  4574. FUNCTION OCESetupGetDirectoryInfo(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4575.     {$IFC NOT GENERATINGCFM}
  4576.     INLINE $3F3C, $20E, $AA5E;
  4577.     {$ENDC}
  4578.  
  4579. {$ALIGN RESET}
  4580. {$POP}
  4581.  
  4582. {$SETC UsingIncludes := OCEAuthDirIncludes}
  4583.  
  4584. {$ENDC} {__OCEAUTHDIR__}
  4585.  
  4586. {$IFC NOT UsingIncludes}
  4587.  END.
  4588. {$ENDC}
  4589.